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

@quesoph: Maybe you made a little mistake there in line 3? Check will try to compare if the users in pvp_y_8_2 are greater than the int representation of the string "Izlude".

 

I'd remove the useless Izlude there and fix the mistake, like this:

 

-    script    FSRS::fsr    -1,{if ( select  ( "Warp to "+.map$[1]+" [ "+getmapusers(.map$[0])+" / "+.map$[1]+" ]", "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 joined 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", 128;    waitingroom "PVP TAGISAN NG LAKAS",0;    end;

 

Pssible add: freeloop to check the loop without infinite loop warnings.

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.