viewing paste Event Warper v2.2 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
//===== 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;
}
Viewed 867 times, submitted by Guest.