Jump to content
  • 0

Adding choose map option for pvp with my current pvp txt


elmucho

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.01
  • Content Count:  32
  • Reputation:   0
  • Joined:  05/27/17
  • Last Seen:  

Hi how to add room names so people can choose map and enter to it 

-    script    PvpRotative    -1,{

OnInit:
// ======================================
// Configurations ***********************
// ======================================
// Which map will be on the rotation?
   setarray .lista$[0],"guild_vs3","pvp_y_3-2","guild_vs4" ,"pvp_y_1-4";
// From how much time to time will the maps change? (Standard value 30 minutes/18000000)
// WARNING, DO NOT SET VALUES HERE SMALLER THAN 60000 (1 Minute).
   set .rotatetime, 4500000;
// ======================================

    set $@lista$, ""+.lista$[0]+"";
    set .count, getarraysize(.lista$);

    for( set .@i,0; .@i < .count; set .@i, .@i+1 ){
            sleep .rotatetime-60000;
            mapannounce ""+.lista$[.@i]+"","The PVP map will change in 30 seconds.",8;
            sleep 30000;
            mapannounce ""+.lista$[.@i]+"","The PVP map will change in 20 seconds.",8;
            sleep 20000;
            mapannounce ""+.lista$[.@i]+"","The PVP map will change in 10 seconds.",8;
            sleep 10000;
            if(.lista$[.@i] == .lista$[.count-1]){
                mapwarp ""+.lista$[.@i]+"",""+.lista$[0]+"",0,0;
                set $@lista$, ""+.lista$[0]+"";
                set .@i,-1;
            }
            else{
                mapwarp ""+.lista$[.@i]+"",""+.lista$[.@i+1]+"",0,0;
                set $@lista$, ""+.lista$[.@i+1]+"";
            }
        }
}

prontera,129,215,5     script    PvP Keeper    843,{

    mes "[PvP Keeper]";
    mes "Ready for a bloody";
    mes "and glorious battle today?";
  if (select("Enter PVP. ["+getmapusers( $@lista$ ) +"]:I'm out of potions today.") == 1) {
      warp $@lista$,0,0;
    announce strcharinfo(0)+" has entered PVP! at "+$@lista$,0;
      end;
  }
    next;
    mes "[PvP Keeper]";
    mes "Haha!~";
    mes "It's okay to be scared!!";
    mes "HAHAHAHAHAHA!";
    close;
    
}

 

Edited by Cyro
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

use code box to paste your code next time,

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

You have to make a new script for it, the script you pasted is a PVP Warper that just randomizes a set of map for a period of time.

Maybe try this:

prontera,100,100,3	script	PVP Warper	100,{

mes "Choose a PVP Room:";
switch(select("Random:Room 1:Room 2:Room 3")) {
	case 1: set .pvproom$,.randroom[rand(0,2)]; goto OnPVPWarp; end;
	case 2: set .pvproom$,"guild_vs1"; goto OnPVPWarp; end;
	case 3: set .pvproom$,"guild_vs2"; goto OnPVPWarp; end;
	case 4: set .pvproom$,"guild_vs3"; goto OnPVPWarp; end;
}

OnPVPWarp:
close2;
warp .pvproom$,0,0;
announce strcharinfo(0)+" has entered PVP! at "+.pvproom$,0;
end;

OnInit:
setarray .randroom$[0],guild_vs1,guild_vs2,guild_vs3;
end;

}

 

Edited by sotf
edited. Just in-case the poster wants random.
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...