Jump to content
  • 0
Sign in to follow this  
nikki1200

Announce the Player when Entering PVP

Question

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,

Share this post


Link to post
Share on other sites

26 answers to this question

Recommended Posts

  • 0

single pvp room.

-	script	FSRS::fsr	-1,{if ( select  ( "warp now!", "nothing." ) == 2 ) close;	if (getmapusers(.map$[0]) >= atoi(.map$[2])) {		mes "[PVP Fight Square Reception Staff]";		mes "This map is currently full.";		close;	}	announce "[ "+strcharinfo(0)+" ] has been join the battle!",0;	warp .map$[0],0,0;	end;OnInit:	setarray .map$[0], "pvp_y_8-2", "Izlude", 128;	waitingroom "PVP TAGISAN NG LAKAS",0;	end;}//Fight Square Reception Staffaldebaran,146,172,4	duplicate(fsr)	PVP#f1	685 // duplicate

Share this post


Link to post
Share on other sites
  • 0
    else {    announce "[ "+strcharinfo(0)+" ] has been join the battle.",0;    warp .@Maps$[.@i],0,0;    close;    }

Try that.

Edited by sevenzz23

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

try to replace it with 

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

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0
 Try changing your script to this : 
//===== 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
Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

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 :) What i meant to say is that if you will use single data you should use set instead of setarray :3

Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

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.

//===== 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
Edited by sevenzz23

Share this post


Link to post
Share on other sites
  • 0

Multiple pvp room

-    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
Edited by quesoph

Share this post


Link to post
Share on other sites
  • 0

 

-    script    FSRS::fsr    -1,{if ( select  ( "Warp to "+.map$[1]+" [ "+getmapusers(.map$[0])+" / "+.map$[2]+" ]", "nothing." ) == 2 ) close;    if (getmapusers(.map$[0]) >= atoi(.map$[1])) {        mes "[PVP Fight Square Reception Staff]";        mes "This map is currently full.";        close;    }    announce "[ "+strcharinfo(0)+" ] has been join the battle!",0;        while(1) {        set .@x,rand(0,300);        set .@y,rand(0,300);        if( checkcell(.map$[0], .@x, .@y, cell_chkpass)) break;    }    warp .map$[0],.@x,.@y;    end;    OnInit:    setarray .map$[0], "pvp_y_8-2", "Izlude", 128;    waitingroom "PVP TAGISAN NG LAKAS",0;    end;}//Fight Square Reception Staffaldebaran,146,172,4    duplicate(fsr)    PVP#f1    100 // duplicate

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.