Jump to content
  • 0

Help me with this script


kaka19

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  86
  • Reputation:   1
  • Joined:  08/24/12
  • Last Seen:  

Hello there..

Im creating pvp 1vs1 from a references script, here the script.

prontera,161,190,4 script pvp1vs1 91,{
set .@n$,"[^FF0000PVP Manager^000000]";
set .@charid,getcharid(0);
mes .@n$;
mes "Would you like to register for a 1vs1 PVP Battle?";
next;
menu "Yes",-,"No",L_cancel;
if(getmapusers("guild_vs1") > 0) { mes .@n$; mes "There appears to be a match currently in session. Check back momentarily."; close; }
mes .@n$;
mes "Which side of the arena would you like to join?";
next;
menu "a ("+$pvp1A+"/1)",L_a,"b ("+$pvp1B+"/1)",L_b,"Cancel",L_cancel,"Clear",L_clear;

L_a:
if(.@charid == $pvp1Achar1 || .@charid == $pvp1Bchar1 ) { mes .@n$; mes "You may only register once per round."; close; }
if($pvp1A < 1) {
set $pvp1A,$pvp1A+1;
if($pvp1A == 1) { set $pvp1Achar1,getcharid(0); }
mes .@n$;
mes "You've joined the selected team. Once the other four teams have filled up, you'll automatically be transferred into the PVP arena. If all four teams do not fill up within the next 30 seconds, this session will be cleared.";
npctalk strcharinfo(0)+" has entered the round on the North side.";
if($pvp1B == 0) { initnpctimer;}
else {stopnpctimer; goto L_begin;}
close;
}
else {goto L_full;}

L_b:
if(.@charid == $pvp1Achar1 || .@charid == $pvp1Bchar1 ) { mes .@n$; mes "You may only register once per round."; close; }
if($pvp1B < 1) {
set $pvp1B,$pvp1B+1;
if($pvp1B == 1) { set $pvp1Bchar1,getcharid(0); }
mes .@n$;
mes "You've joined the selected team. Once the other four teams have filled up, you'll automatically be transferred into the PVP arena. If all four teams do not fill up within the next 30 seconds, this session will be cleared.";
npctalk strcharinfo(0)+" has entered the round on the North side.";
if($pvp1A == 0) { initnpctimer;}
else {stopnpctimer; goto L_begin;}
close;

}
else {goto L_full;}

L_full:
mes .@n$;
mes "Sorry, but this team is full. Try another team, please.";
close;


L_begin:
npctalk "All four teams have been filled. All participants currently logged in will be transferred to the arena in ten seconds.";
set .@x,0;
goto L_check;

L_check:
warpchar "guild_vs1",49,92,$pvp1Achar1;
warpchar "guild_vs1",49,92,$pvp1Bchar1;
npctalk "A round is now in session.";
goto L_clear;


L_cancel:
mes .@n$;
mes "Do come back if you change your mind.";
close;


OnTimer10000:
npctalk "Ten seconds have passed. Entry to the round ends in 20 seconds.";


OnTimer20000:
npctalk "Twenty seconds have passed. Entry to the round ends in 10 seconds.";


OnTimer30000:
npctalk "Thirty seconds have passed and thus I have canceled the round.";
stopnpctimer;
goto L_clear;

L_clear:
set $pvp1A,0;
set $pvp1B,0;
set $pvp1Achar1,0;
set $pvp1Bchar1,0;
close;
}

they will teleport to area guildvs1, after battle the lose player automatically teleport to prontera.

and the question is..

how script for teleport automatically the rest of player win to prontera?

thx for your help

Edited by Emistry
Please use [CODEBOX] or Attachments for long contents.
Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

OnPCDieEvent:
if(strcharinfo(3) == "guild_vs3" ){
warp "prontera",0,0;
end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  86
  • Reputation:   1
  • Joined:  08/24/12
  • Last Seen:  

OnPCDieEvent:
if(strcharinfo(3) == "guild_vs3" ){
warp "prontera",0,0;
end;
}

didnot work :( the rest of player win dindnt teleport automatically

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

~.~ make it clearly i don't understand what you say!

they will teleport to area [b]guildvs1[/b], after battle the lose player automatically teleport to prontera.
and the question is..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  86
  • Reputation:   1
  • Joined:  08/24/12
  • Last Seen:  

~.~ make it clearly i don't understand what you say!

they will teleport to area [b]guildvs1[/b], after battle the lose player automatically teleport to prontera.
and the question is..

mmm.. and the question is

how can i teleport automatically the player who wins to prontera?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

OnKillEvent:
if(strcharinfo(3) == "mapname"){
   announce ""+strcharinfo(0)+" Won!",0;
   getitem id,quantity; // you can add the reward here!
   warp "prontera",0,0;
 end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  86
  • Reputation:   1
  • Joined:  08/24/12
  • Last Seen:  

OnKillEvent:
if(strcharinfo(3) == "mapname"){
announce ""+strcharinfo(0)+" Won!",0;
getitem id,quantity; // you can add the reward here!
warp "prontera",0,0;
 end;
}

thank sir, but it doest work.. :(

L_clear:
set $pvp4nA,0;
set $pvp4nB,0;
set $pvp4nAchar1,0;
set $pvp4nBchar1,0;
close;
end;
OnKillEvent:
if(strcharinfo(3) == "guild_vs1"){
announce ""+strcharinfo(0)+" Won!",0;
getitem 501,20; // you can add the reward here!
warp "prontera",159,186;
close;
 end;
}
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

change the

OnKillEvent:
if(strcharinfo(3) == "mapname"){
announce ""+strcharinfo(0)+" Won!",0;
getitem id,quantity; // you can add the reward here!
warp "prontera",0,0;
 end;
}

thank sir, but it doest work.. :(

L_clear:
set $pvp4nA,0;
set $pvp4nB,0;
set $pvp4nAchar1,0;
set $pvp4nBchar1,0;
close;
end;
OnKillEvent:
if(strcharinfo(3) == "guild_vs1"){
announce ""+strcharinfo(0)+" Won!",0;
getitem 501,20; // you can add the reward here!
warp "prontera",159,186;
close;
 end;
}
}

change the OnKillEvent on. OnPCKillEvent: // sorry a mistake ther e :)

Edited by bVersatile
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  86
  • Reputation:   1
  • Joined:  08/24/12
  • Last Seen:  

change the OnKillEvent on. OnPCKillEvent: // sorry a mistake ther e :)

thx sir, its work now :)

btw i changed script like these

OnPCKillEvent:
if(getmapusers("guild_vs1") < 3){
if(strcharinfo(3) == "guild_vs1"){
announce ""+strcharinfo(0)+" Won!",0;
getitem 501,20; // you can add the reward here!
warp "prontera",159,186;
close;
 end;
}}

but i didnt work. im going to create 3vs3 pvp.. can you help me sir?

Edited by kaka19
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:  

if you want to warp out all the player from the map...why not use this ?

OnPCKillEvent:
mapannounce strcharinfo(3),"All will be warped out in 5 seconds.",0;
sleep2 5000;
mapwarp strcharinfo(3),"prontera",155,181;
end;

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...