Jump to content
  • 0

script random player


MasterSub

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  01/23/18
  • Last Seen:  

hello friends i want so i click on the npc, just me, and he select someone from the have map, like there are 10 on the map he pulls one and teleport on, it just that when i click on the npc and i'm not chosen he doesn't teleport the other.

 

the script

set $randoom, getusers(8);
mes "tem "+$randoom+" pessoas aki";
.@rand = rand(1,$randoom);
setarray .id[1],$randoom;

if (.id[.@rand] >= 1){
.id[.@rand]	 = 0;
$randoom = 0;
mes "Você foi escolhido";
next;
warp "prontera",155,150;
end;
}

mes "[false]";
close;
}

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   704
  • Joined:  12/21/14
  • Last Seen:  

i didn't understand what you are saying

this will warp a random player from the given map to "prontera",155,150

.@s = getmapunits(BL_PC,"map_name",.@names$);
warp "prontera",155,150,getcharid(0,.@names$[rand(.@s)]);

 

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