summaryrefslogblamecommitdiff
path: root/world/map/npc/functions/gm_island.txt
blob: 900e02223ffbacd3f720cb369ed3fa59672276c3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                                                              
                        








                            





























                                                                           
                      
 



                                                    

                                                   
                                                   

           
                       
 
                     

                                  
                                          

                                         
 





                                            

                                     

                                    
 
          
                               


                           
           




                            
           

























                                                                                                           
 
                                       



                      
                                       



                      
                                       



                      
// Add Localized Warp in town centers and Message to GM Island
-|script|#GmConfig|32767
{
    end;

OnInit:
    disablenpc "Gm Event#1";
    disablenpc "Gm Event#2";
    disablenpc "Gm Event#3";
    end;
}
-|script|#Puppet|32767
{
    mes "You found me! Now please send my coordinates to staff.";
    close;

OnSpawn:
    callfunc "argv_splitter";
    if (@argv$[4] == "") goto L_Failed;
    set $@PMAP$, @argv$[0];
    set $@PX, @argv$[1];
    set $@PY, @argv$[2];
    set $@PNAME$, @argv$[3];
    set $@PNPC, @argv$[4];
    debugmes "Map "+$@PMAP$+" ID "+$@PNPC;
   if (puppet($@PMAP$, $@PX, $@PY, $@PNAME$, $@PNPC) < 1) debugmes "Error";
    set $@PMAP$, "";
    set $@PX, 0;
    set $@PY, 0;
    set $@PNAME$, "";
    set $@PNPC, 0;
    end;

L_Failed:
    message strcharinfo(0), "Syntax: @puppeter MAP X Y NAME NPCID";
    end;

OnInit:
    registercmd chr(ATCMD_SYMBOL) + "puppeter", strnpcinfo(0)+"::OnSpawn";
    end;
}
function|script|GmWarp
{
    if ($@GM_EVENT_WARP == 1) warp "028-1", 110, 30;
    if ($@GM_EVENT_WARP == 2) warp "028-1", 119, 74;
    if ($@GM_EVENT_WARP == 3) warp "028-3", 68, 36;
    if ($@GM_EVENT_WARP == 4) warp "001-3", 0, 0;
    if ($@GM_EVENT_WARP == 5) warp "070-1", 30, 92;
    if ($@GM_EVENT_WARP == 6) warp "070-3", 60, 63;
    if ($@GM_EVENT_WARP == 7) warp "003-1", 44, 94;
    return;
}
function|script|GmDebug
{
    mes "[GM Debug]";
    mes "What do you want to do?";
    menu
        "Open Event Portals.", L_GmChoose,
        "Close Event Portals.", L_GmStop,
        "Disguise.", L_Disguise;

L_GmChoose:
    mes "Choose a destination:";
    menu
        "GM Island (entrance)", L_GmStart,
        "GM Island (auditorium)", L_GmStart,
        "GM Island (cave)", L_GmStart,
        "Tulimshar Arena", L_GmStart,
        "Underworld", L_GmStart,
        "The Abyss", L_GmStart,
        "2006 Tulimshar", L_GmStart;

L_GmStart:
    set $@GM_EVENT_WARP, @menu;
    enablenpc "Gm Event#1";
    enablenpc "Gm Event#2";
    enablenpc "Gm Event#3";
    return;

L_GmStop:
    disablenpc "Gm Event#1";
    disablenpc "Gm Event#2";
    disablenpc "Gm Event#3";
    return;

L_Disguise:
    npcaction 9;
    mes "[GM Debug - Disguise]";
    mes "The Disguise function allows GMs to disguise themselves as mobs or npcs.";
    mes "---";
    mes "Mob IDs: [@@https://www.themanaworld.org/index.php/Monster_Reference|Monster Reference@@]";
    mes "You can either logout or use id ##B0##b to reset.";
    mes "---";
    mes "Please input the mob ID:";
    input @disguise_id;
    if (@disguise_id < 1000 || @disguise_id > 32767)
        goto L_ResetClass;
    mes "Your disguise has been changed.";
    if (Class <= 5)
        set @old_class, Class;
    set Class, @disguise_id;
    mes "";
    mes "For technical reasons, you are not able to see your own disguise, but other players will see it.";
    return;

L_ResetClass:
    mes "Your appearance has been reset.";
    set Class, if_then_else(@old_class, @old_class, 1);
    callfunc "fixHeadStyles";
    return;
}
001-1,49,68,0|script|Gm Event#1|368,0,0
{
    callfunc "GmWarp";
    end;
}
009-1,46,30,0|script|Gm Event#2|368,0,0
{
    callfunc "GmWarp";
    end;
}
020-1,67,89,0|script|Gm Event#3|368,0,0
{
    callfunc "GmWarp";
    end;
}