//===== eAthena Unofficial Script ===========================================
//= Event Warper
//===== By: =================================================================
//= rad417
//===== Current Version: ====================================================
//= 2.2
//===== Tested With: ====================================================
//= Trunk, SVN 13366+
//===== Description: ========================================================
//= Warps players to event place
//===== Additional Comments: ================================================
//= For revisions, see the change log!
//= 1.0 Script created
//= 1.1 Added Test Warp for GMs
//= 1.2 Added status PUB.
//= 2.0 Implemented an ON and OFF system and an indicator(PUB and npc),
//= also started with remote funtions, but failed to implement
//=2.1 Added the line "sc_end SC_ALL;" for debuff upon warping :D (tnx ~AnnieRuru~, i read one of your post about this :D )
//=2.2 Finally implemented the remote function :D
//===========================================================================
prontera,155,174,4 script Event Warper 939,{
if (getgmlevel()>=80){
check:
if($state==0){
goto off;
}
else{
goto on;
}
close;
//--------------STATE: OFF----------------------------------------------------
off:
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Event NPC State: ^FF0000OFF^000000";
mes "^221122--------Current Settings:--------^000000";
mes "Map: "+$map$+" "+$x+" "+$y;
mes "Event: "+$event$;
//mes "For remote commands:"; not yet implemented
//mes "PM ^FF0000NPC:Event Warper^000000";
menu "Nothing",noon,"Turn ON",yeson,"Set Event Warp.",setplace,"Warp",yeswarp;
yeson:
set $state,1;
next;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Ok it is now turned ^009900ON^000000.";
delwaitingroom;
waitingroom "Event: "+$event$,0;
next;
goto check;
noon:
next;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Ok bye!";
close;
//--------------STATE: ON----------------------------------------------------
on:
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Event NPC State: ^009900ON^000000";
mes "^221122--------Current Settings:--------^000000";
mes "Map: "+$map$+" "+$x+" "+$y;
mes "Event: "+$event$;
//mes "For remote commands:";
//mes "PM ^FF0000NPC:Event Warper^000000";
menu "Nothing",nooff,"Turn OFF",yesoff,"Set Event Warp.",setplace,"Warp",yeswarp;
yesoff:
set $state,0;
next;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Ok it is now turned ^FF0000OFF^000000.";
delwaitingroom;
waitingroom "No Event.",0;
next;
goto check;
nooff:
next;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Ok bye!";
close;
setplace:
next;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "You can set the event place here for easy access to players.";
mes "Set it?";
menu "Yes",yes,"No.",no;
yes:
next;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Just make sure you have the right coordinates.";
mes "It should be map x-coordinate y coordinate";
next;
change:
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Enter map name";
mes "example: prontera";
input $map$;
next;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Enter the x-coordinate:";
mes "example: 150";
input $x;
next;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Enter the y-coordinate:";
mes "example: 150";
input $y;
next;
mes "That is "+$map$+" "+$x+" "+$y+" right?";
menu "Yes.",-,"Let me change it.",change;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Enter the Name of the EVENT:";
mes "example: RFYL";
input $event$;
next;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Ok, I will warp the contestants there.";
close;
no:
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Ok. Bye.";
close;
}
//----------------------Normal Player---------------------------------
else{
if($state<=0){
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "Sorry. No events at this time.";
emotion 17;
close;
}
else{
emotion 21;
mes "[^3333FFAphoticRO Event Warper^000000]";
mes "There is an active event!";
mes "Do you want to go to the event place?";
menu "Yes, please.",yeswarp,"No, thanks.",nowarp;
yeswarp:
atcommand "@warp "+$map$+" "+$x+" "+$y;
sc_end SC_ALL;
end;
nowarp:
close;
}}
//---------------------remote functions-------------------------NOTE: Not yet functional------------------------------
OnWhisperGlobal:
if (@whispervar0$=="|00On") {goto remoteon; close;}
if (@whispervar0$=="|00Off"){goto remoteoff; close;}
else dispbottom "Invalid syntax, you typed '"+@whispervar0+"'? you can only type On or Off.";
end;
remoteon:
set $state,1;
dispbottom "Ok it is now turned ON.";
delwaitingroom;
waitingroom "Event: "+$event$,0;
end;
remoteoff:
set $state,0;
dispbottom "Ok it is now turned OFF.";
delwaitingroom;
waitingroom "No Event.",0;
end;
OnInit:
set $state,0;
delwaitingroom;
waitingroom "No Event.",0;
end;
}