pxxpw123 Posted March 21, 2015 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 6 Reputation: 0 Joined: 12/15/13 Last Seen: April 1 Share Posted March 21, 2015 (edited) Hi guys, first sorry for my bad english i'll try explain with most clean way i can.Well i'm having trouble with players attach what i need is give some item to all players in the map. Here what i get after some search: set(.player,getcharid(3)); deletearray(.players[0],128); addrid(0); set(.players[getarraysize(.players)],getcharid(3)); detachrid; attachrid(.player); if (.player == $mapabombporing$ ) { announce "Parabéns"+ strcharinfo(0) +", Você ganhou o evento!!! :D",3, 0x_FFFF00; sleep2 2000; getitem(512,1,set(.@a,.players[rand(getarraysize(.players))])); announce "Já recebeu seu prêmio agora TCHAU! :P",3; sleep2 3000; warp "prontera",150,150; goto OnInit; } Here is my error: OnInit i have: set $mapabombporing$, "prontera"; _________________________________________________________________________________This npc is my new game center and live in prontera thats why i use, this part of script will give some prize to all winners of Bomb poring event. if i need give more information please ask thx guys! Edited March 21, 2015 by pxxpw123 Quote Link to comment Share on other sites More sharing options...
Capuche Posted March 21, 2015 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 613 Joined: 07/05/12 Last Seen: Monday at 01:55 PM Share Posted March 21, 2015 I don't see anything wrong related with your error, please show the part before set(.player,getcharid(3)); However some mistakes if (.player == $mapabombporing$ ) { .player return the account id of the player attached while $mapabombporing$ return a string, the map some item to all players in the map. getitem(512,1,set(.@a,.players[rand(getarraysize(.players))])); Your script give actually one item to 1 random player in your server (not only on the map, see addrid doc) Quote Link to comment Share on other sites More sharing options...
pxxpw123 Posted March 22, 2015 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 6 Reputation: 0 Joined: 12/15/13 Last Seen: April 1 Author Share Posted March 22, 2015 (edited) Hi Capuche, thx for help.i do some changes here all new event prize part: Premio_Auto_Event: switch( $eventocheck ) { case 1: //--------> Evento_Um case 2: //--------> Evento_Dois case 3: //--------> Evento_Tres set(.player,getcharid(3)); deletearray(.players[0],128); addrid(0); set(.players[getarraysize(.players)],getcharid(3)); detachrid; attachrid(.player); if (strcharinfo(3) == $mapabombporing$ ) { announce "Parabéns"+ strcharinfo(0) +", Você ganhou o evento!!! :D",3, 0x_FFFF00; sleep2 2000; getitem $premioevento, $qntpremioevento; announce "Já recebeu seu prêmio agora TCHAU! :P",3; sleep2 3000; warp "prontera",150,150; goto OnInit; } case 4: //--------> Evento_Quatro } the error still the same on server. Here a screenshot of NPC Script Editor (i don't know if i can post a large image, if i can't sorry. ): @Edit:I have finished add bomb poring to my script but i'm having the same problem without this code.here is my full script atm:http://pastebin.com/r3jScRcu Thx Sir! Edited March 22, 2015 by pxxpw123 Quote Link to comment Share on other sites More sharing options...
Question
pxxpw123
Hi guys, first sorry for my bad english i'll try explain with most clean way i can.
Well i'm having trouble with players attach what i need is give some item to all players in the map.
Here what i get after some search:
Here is my error:
OnInit i have:
set $mapabombporing$, "prontera";
_________________________________________________________________________________
This npc is my new game center and live in prontera thats why i use, this part of script will give some prize to all winners of Bomb poring event.
if i need give more information please ask
Edited by pxxpw123thx guys!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.