Announce the Player when Entering PVP

nikki1200

New member
Messages
113
Points
0
Hi Everyone,

seeking for your assistance on how to add the announce script after the player entered into the pvp. don't know how to put it on my script (Please see below my script on entering the pvp izlude.

//===== Hercules Script ======================================
//= PvP NPCs
//===== By: ==================================================
//= kobra_k88; L0ne_W0lf, Elias (og2)
//===== Current Version: =====================================
//= 2.3
//===== Description: =========================================
//= PvP NPCs that are found in the Inns in major cities.
//= Includes Yoyo Mode, Nightmare Mode, and Event Mode.
//===== Additional Comments: ================================= 
//= 2.0 Narrators/GateKeepers,etc. Translated from the Official 2011 [Elias]
//= 2.1 Changed PVP Narrator and GateKeeper to Floating NPC [Elias]
//= 2.2 Some cleaning. [Euphy]
//= 2.3 Fixed grammatical errors. [Joseph]
//============================================================
 
//Fight square Reception Staff (Locations below)
- script FSRS::fsr -1,{
setarray .@Maps$[0],"pvp_y_8-2";
setarray .@Name$[0],"Izlude";
setarray .@Limit[0],128;
 
set .@menu$, .@menu$+.@Name$[.@i]+" ["+getmapusers(.@Maps$[.@i])+" / "+.@Limit[.@i]+"]:";
set .@menu$, .@menu$+"Cancel.";
set .@i, select(.@menu$)-1;
if (.@i == 5) close;
if (getmapusers(.@Maps$[.@i]) >= .@Limit[.@i]) {
mes "[PVP Fight Square Reception Staff]";
mes "This map is currently full.";
}
else warp .@Maps$[.@i],0,0;
close;
 
OnInit:
waitingroom "PVP TAGISAN NG LAKAS",0;
end;
}
 
//Fight Square Reception Staff
aldebaran,146,172,4 duplicate(fsr) PVP#f1 685
 
Please advise,
 
Thanks,
 
else { announce "[ "+strcharinfo(0)+" ] has been join the battle.",0; warp .@Maps$[.@i],0,0; close; }
Try that.

 
Last edited by a moderator:
Thanks Sir sevenzz23 the announce is now working however i'm encountering problem when i entered on the map. i think it's a bug? when i entered on a map i can't move it's stack on a place. do you have idea on why it's happening?

Please advise,

Thanks,

-nik

 
try to replace it with 

Code:
    else {    announce "[ "+strcharinfo(0)+" ] has been join the battle.",0;    close2;    warp .@Maps$[.@i],0,0;    end;    }
 
okay i will now try. Thx Sir. Sir do you have any idea on how to put dota sounds on pvp/woe everytime the player kill like godlike?

Please advise,

Thanks,

 
Hi Sir sevenzz23,

else {
announce "[ "+strcharinfo(0)+" ] has been join the battle.",0;
close2; - is it close or close2?
warp .@Maps$[.@i],0,0;
end;
}

Thanks,

-nik

 
close2; so that the following script will also run. then end;

 
Thanks Sir sevenzz23,

it's the same i'm still encountering stack on the izlude map. it's like 5/10 attempt before i stack on the map.

Thanks,

 
That's close2; Close means creating a close button and ending the script, and will not work if there's no message dialog open. Close2 means creating a close button that will continue the script after being clicked until an end; is found there.

Anyways I think there's no message dialogs there so you could possibly remove that close2; and the script would keep working without any problems. I'd test that if I had any means of doing so.

 
Hi Sir jaBote,

is there a way to fix the stack on the izlude map? there's sometime i warp on the water that's why i can't move.

Please advise,

Thanks,

 
I don't know at the moment. Maybe you're using old Izlude map on your client while the server thinks you're using the new one? Or vice-versa: you're using the new one and the server thinks you have the old one? There had been a lot of problems with izlude about this before.

P.S.: Please try to make a separate topic for each issue. This way we'll have better forum organization and people will also reply your topic better and faster.

 
Oh I see , soo izlude map is the issue
default_smile.png
 

 
Code:
 Try changing your script to this : 
Code:
//===== Hercules Script ======================================//= PvP NPCs//===== By: ==================================================//= kobra_k88; L0ne_W0lf, Elias (og2)//===== Current Version: =====================================//= 2.3//===== Description: =========================================//= PvP NPCs that are found in the Inns in major cities.//= Includes Yoyo Mode, Nightmare Mode, and Event Mode.//===== Additional Comments: ================================= //= 2.0 Narrators/GateKeepers,etc. Translated from the Official 2011 [Elias]//= 2.1 Changed PVP Narrator and GateKeeper to Floating NPC [Elias]//= 2.2 Some cleaning. [Euphy]//= 2.3 Fixed grammatical errors. [Joseph]//============================================================//Fight square Reception Staff (Locations below)-    script    FSRS::fsr    -1,{        set .@Map$,"pvp_y_8-2";        setarray .@Name$[0],"Izlude";        setarray .@Limit[0],128;    set .@menu$, .@menu$+.@Name$[.@i]+" ["+getmapusers(.@Maps$)+" / "+.@Limit[.@i]+"]:";    set .@menu$, .@menu$+"Cancel.";    set .@i, select(.@menu$)-1;    if (.@i == 5) close;    if (getmapusers(.@Maps$) >= .@Limit[.@i]) {        mes "[PVP Fight Square Reception Staff]";        mes "This map is currently full.";    }    else warp .@Map$,0,0;    close;OnInit:    waitingroom "PVP TAGISAN NG LAKAS",0;end;}//Fight Square Reception Staffaldebaran,146,172,4    duplicate(fsr)    PVP#f1    685
 
Last edited by a moderator:
I don't find it good that you use an array and use it on a warp command. Practically and realistically would you want your character to warp to multiple maps like naruto doing kagebunshin and go to every single company on the shinobi war? I don't think so. 

JK
default_smile.png
What i meant to say is that if you will use single data you should use set instead of setarray :3

 
Last edited by a moderator:
okay use this..

Pretty sure its working

@edit

Patskie is right.. if you want to use multiple maps, use setarray, or else use set if its single.

Code:
//===== Hercules Script ======================================//= PvP NPCs//===== By: ==================================================//= kobra_k88; L0ne_W0lf, Elias (og2)//===== Current Version: =====================================//= 2.3//===== Description: =========================================//= PvP NPCs that are found in the Inns in major cities.//= Includes Yoyo Mode, Nightmare Mode, and Event Mode.//===== Additional Comments: ================================= //= 2.0 Narrators/GateKeepers,etc. Translated from the Official 2011 [Elias]//= 2.1 Changed PVP Narrator and GateKeeper to Floating NPC [Elias]//= 2.2 Some cleaning. [Euphy]//= 2.3 Fixed grammatical errors. [Joseph]//============================================================//Fight square Reception Staff (Locations below)-    script    FSRS::fsr    -1,{        set .@Maps$[0],    "pvp_y_8-2";        set .@Name$[0],    "Izlude";        set .@Limit[0],    128;     for(set .@i,0; .@i<1; set .@i,.@i+1)        set .@menu$, .@menu$+.@Name$[.@i]+" ["+getmapusers(.@Maps$[.@i])+" / "+.@Limit[.@i]+"]:";    set .@menu$, .@menu$+"Cancel.";    set .@i, select(.@menu$)-1;    if (.@i == 5) close;    if (getmapusers(.@Maps$[.@i]) >= .@Limit[.@i]) {        mes "[PVP Fight Square Reception Staff]";        mes "This map is currently full.";        close;    }    announce "[ "+strcharinfo(0)+" ] has been join the battle!",0;    warp .@Maps$[.@i],0,0;    end;OnInit:    waitingroom "PVP TAGISAN NG LAKAS",0;end;}//Fight Square Reception Staffaldebaran,146,172,4    duplicate(fsr)    PVP#f1    685
 
Last edited by a moderator:
Multiple pvp room

Code:
-    script    FSRS::fsr    -1,{    for( set .@i, 0; .@i < getarraysize(.name$[0]); set .@i, .@i + 1 ) {        set .@menu$, .@menu$ +  .name$[.@i] + " - " + " [ ^ff0000" + getmapusers(.map$[.@i]) + " / " + .limit[.@i] + "^000000 ]";        set .@menu$, .@menu$ + ":";    }    set .@choice, select(.@menu$) - 1;        if( .map$[.@choice] == " " || .map$[.@choice] == "") { mes "Error Please Report it.";close; } // if map doesn't exist print this.    if (getmapusers(.map$[.@choice]) >= .limit[.@choice]) { // check map limit	    mes "[ Fight Square Staff ]",            "This map is currently full.";        close;    }    warp .map$[.@choice],0,0; // warp    announce strcharinfo(0)+ " Has entered "+ .name$[.@choice] + " Pvp room!",0; // announce    close;OnInit:    setarray .name$[0], "Izlude", "payon", "prontera", "geffen", "jazeera"; // mapname. izlude's warp name is pvp_y_8-2.    setarray .map$[0], "pvp_y_8-2", "payon", "prontera", "geffen", "jazeera"; // map warp.    setarray .limit[0], 128, 20, 10 , 1, 1; // map char limit    waitingroom "PVP TAGISAN NG LAKAS",0;end;}aldebaran,146,172,4    duplicate(fsr)    PVP#f1    685 // duplicate
 
Last edited by a moderator:
Back
Top