Jump to content
  • 0

H>PvP Script


patr3k

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  257
  • Reputation:   7
  • Joined:  03/12/12
  • Last Seen:  

Can someone debug this one for me?

prontera,155,181,5    script    Sample    757,{
setarray .@Map$[0],"pvp_y_1-1","pvp_y_1-2";

mes "Select your room";
set .@i,select("Room 1 ["+getmapusers(.@Map$[0])+"/50]:Room 2 ["+getmapusers(.@Map$[1]+"]"/50)) - 1;
if( getmapusers( .@Map$[.@i] ) >= 50 ){
   mes "Sorry, room Full.";
   close;
}else{
   warp .Map$[.@i],0,0;
   announce "["+strcharinfo(0)+"] has entered the PVP room ("+.Map$[.@i]+")!",0;}
end;

OnPCKillEvent:
for( set .@i,0; .@i < getarraysize( .@Map$ ); set .@i,.@i + 1 )
   if( strcharinfo(3) == .@Map$[.@i] ){
       announce "["+strcharinfo(0)+"] has killed ["+rid2name(killedrid)+"] in "+strcharinfo(3),0;
       break;
   }
end;
}

getting error when i click the npc.

pvp.jpg

Also, should i set the mapflags?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

set .@i,select("Room 1 ["+getmapusers(.@Map$[0])+"/50]:Room 2 ["+getmapusers(.@Map$[1])+"/50]") - 1;

pvp_y_1-1 mapflag pvp
pvp_y_1-2 mapflag pvp

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.02
  • Content Count:  257
  • Reputation:   7
  • Joined:  03/12/12
  • Last Seen:  

@Emistry

should i set like this one?

pvp_y_1-1 mapflag nosave

pvp_y_1-1 mapflag noteleport

pvp_y_1-1 mapflag nowarpto

pvp_y_1-1 mapflag nowarp

pvp_y_1-1 mapflag nomemo

pvp_y_1-1 mapflag gvg off

pvp_y_1-1 mapflag pvp

pvp_y_1-1 mapflag nopenalty

pvp_y_1-1 mapflag nobranch

pvp_y_1-1 mapflag pvp_noguild

pvp_y_1-1 mapflag pvp_noparty off

pvp_y_1-1 mapflag nocommand 40

Thank you so much Emistry!

Another debug when i choose the room:

map.jpg

I checked my map_index and there's

pvp_y_1-1 and pvp_y_1-2

Edited by patr3k
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  148
  • Topics Per Day:  0.03
  • Content Count:  299
  • Reputation:   6
  • Joined:  06/14/12
  • Last Seen:  

moving player 'fadfasdfasf' to "",0,0 failed

Try this:

hmm.. based on your error..check if the map was available and if it is restricted (I don't know where could you see the map list, I'm just a newbie)

Edited by zmref
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

pvp_y_1-1 mapflag nosave SavePoint 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Change

	warp .Map$[.@i],0,0;

to

       warp .@Map$[.@i],0,0;

Edited by Joseph
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...