Jump to content
  • 0

Spectate NPC


ShiroNaito

Question


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.02
  • Content Count:  65
  • Reputation:   1
  • Joined:  04/04/19
  • Last Seen:  

Goodevening ! Can someone help me with this script I copied here on rathena ? 

the OnPCLogoutEvent is not working .  But when I use the NPC Manager the script is working .. I dont understand why .. 

 

Quote

-    script    warspec    -1,{
OnInit:
setcell "guild_vs1",1,1,312,392,cell_nochat,1;
setcell "guild_vs3",1,1,312,392,cell_nochat,1;
setcell "guild_vs4",1,1,312,392,cell_nochat,1;
setcell "gon_test",1,1,312,392,cell_nochat,1;
OnWhisperGlobal:
if(@whispervar0$ == "hello") {
if(getgmlevel() > 1) {
    mes "Hello din po!";
    switch(select("Enable:Disable")){
        case 1: 
            enablenpc "War Spectator Manager#main";
            close;
        case 2: 
            disablenpc "War Spectator Manager#main";
            close;
        end;
    }
    }
else{
    dispbottom "Pakyu ka po!";
    end;
}
}
end;
}

chivalry,77,118,6    script    War Spectator Manager#main    405,{

    mes "^FF0000[War Spectator Manager]^000000";
    mes "Hi im the War Spectator Manager!";
    mes "Your Item's will be removed once you go in!";
    mes "You will be muted when spectating";
    mes "Do you still want to Spectate?";
    next;
switch(select("Yes:No")){
    next;
        mes "^FF0000[War Spectator Manager]^000000";
        mes "On What Map do you want to Spectate?";
        switch(select("guild_vs1 ^FF0000["+getmapusers("guild_vs1")+"]^000000:guild_vs3 ^FF0000["+getmapusers("guild_vs3")+"]^000000:guild_vs4 ^FF0000["+getmapusers("guild_vs4")+"]^000000:gon_test ^FF0000["+getmapusers("gon_test")+"]^000000")){
            case 1: next;
                warp "guild_vs1",50,28;
                setoption Option_Invisible | Option_Xmas, 1;
                atcommand "@fullstrip "+strcharinfo(0);
                sc_start SC_STRIPWEAPON,960000,0;
                       sc_start SC_STRIPSHIELD,960000,0;
                    sc_start SC_STRIPARMOR,960000,0;
                    sc_start SC_STRIPHELM,960000,0;
                    atcommand "@speed 50";
                set Manner, -100;
            case 2: next;
                warp "guild_vs3",49,87;
                                setoption Option_Invisible | Option_Xmas, 1;
                atcommand "@fullstrip "+strcharinfo(0);
                sc_start SC_STRIPWEAPON,960000,0;
                       sc_start SC_STRIPSHIELD,960000,0;
                    sc_start SC_STRIPARMOR,960000,0;
                    sc_start SC_STRIPHELM,960000,0;
                    atcommand "@speed 50";
                set Manner, -100;
            case 3: next;
                warp "guild_vs4",49,19;
                                setoption Option_Invisible | Option_Xmas, 1;
                atcommand "@fullstrip "+strcharinfo(0);
                sc_start SC_STRIPWEAPON,960000,0;
                       sc_start SC_STRIPSHIELD,960000,0;
                    sc_start SC_STRIPARMOR,960000,0;
                    sc_start SC_STRIPHELM,960000,0;
                    atcommand "@speed 50";
                set Manner, -100;
            case 4: next;
                warp "gon_test",58,91;
                                setoption Option_Invisible | Option_Xmas, 1;
                atcommand "@fullstrip "+strcharinfo(0);
                sc_start SC_STRIPWEAPON,960000,0;
                       sc_start SC_STRIPSHIELD,960000,0;
                    sc_start SC_STRIPARMOR,960000,0;
                    sc_start SC_STRIPHELM,960000,0;
                    atcommand "@speed 50";
                set Manner, -100;
                
    }
close;
}
end;
}


guild_vs1,50,7,4    script    War Spectator Manager#exit    405,{
mes "^FF0000[War Spectator Manager]^000000";
mes "Do you want to exit?";
switch(select("Yes:No")){
case 1:
        set Manner, 0;
        setoption Option_Invisible | Option_Xmas, 0;
        sc_end SC_STRIPWEAPON;
                sc_end SC_STRIPSHIELD;
                sc_end SC_STRIPARMOR;
                sc_end SC_STRIPHELM;
                atcommand "@speed 150";
        atcommand "@go 0";
case 2:
    close;
}
end;            
}
guild_vs3,50,87,4    script    War Spectator Manager#exit2    405,{
mes "^FF0000[War Spectator Manager]^000000";
mes "Do you want to exit?";
switch(select("Yes:No")){
case 1:
        set Manner, 0;
        setoption Option_Invisible | Option_Xmas, 0;
        sc_end SC_STRIPWEAPON;
                sc_end SC_STRIPSHIELD;
                sc_end SC_STRIPARMOR;
                sc_end SC_STRIPHELM;
        atcommand "@load";
case 2:
    close;
}
end;            
}    
guild_vs4,50,8,4    script    War Spectator Manager#exit3    405,{
mes "^FF0000[War Spectator Manager]^000000";
mes "Do you want to exit?";
switch(select("Yes:No")){
case 1:
        set Manner, 0;
        setoption Option_Invisible | Option_Xmas, 0;
        sc_end SC_STRIPWEAPON;
                sc_end SC_STRIPSHIELD;
                sc_end SC_STRIPARMOR;
                sc_end SC_STRIPHELM;
        atcommand "@load";
case 2:
    close;
}
end;            
}
gon_test,57,90,4    script    War Spectator Manager#exit4    405,{
mes "^FF0000[War Spectator Manager]^000000";
mes "Do you want to exit?";
switch(select("Yes:No")){
case 1:
        set Manner, 0;
        setoption Option_Invisible | Option_Xmas, 0;
        sc_end SC_STRIPWEAPON;
                sc_end SC_STRIPSHIELD;
                sc_end SC_STRIPARMOR;
                sc_end SC_STRIPHELM;
        atcommand "@load";
case 2:
    close;
}
OnPCLogoutEvent:
    if ( strcharinfo(3) == "guild_vs1" || strcharinfo(3) == "guild_vs3" || strcharinfo(3) == "guild_vs4" || strcharinfo(3) == "gon_test") {
        setoption 0x40 | Option_Invisible | Option_Xmas, 0;
        set Manner, 0;
    end;            
}


guild_vs1    mapflag    notrade
guild_vs3    mapflag    notrade
guild_vs4    mapflag    notrade
gon_test    mapflag    notrade

guild_vs1    mapflag    nodrop
guild_vs3    mapflag    nodrop
guild_vs4    mapflag    nodrop
gon_test    mapflag    nodrop

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.02
  • Content Count:  65
  • Reputation:   1
  • Joined:  04/04/19
  • Last Seen:  

Anyone? Bump

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...