Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
takke
Beginner


Joined: 11 Oct 2002
Posts: 29
Location: Sweden

PostPosted: Sun Jun 01, 2003 8:06 pm   

pktrigger
 
Sigh

This problem are giving me grey hairs. I have written about this code problems earlier and I got a answer but I can still don't get the ¤#&#¤& to work.

Here is the problem.
I have a trigger that looks in a room and puts all the players in the room to a list.
The I've got another list with bountytarget. People that have a price on there head.
I want the trigger to compare the two lists and if there is a match the trigger will fire and kill the match. But just one at the time. This is the code that I have come to.

Scanning the room =>
%e[1;31m(%a)*
Trigger:#addi char %1

Button: #IF (%ismember( @char, @pk)) {kill} {}

Im not very good in coding so I hope someone that know code can help me.

//Takke
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Jun 01, 2003 11:00 pm   
 
Use this script for the button:
#WHILE (@char and (!%ismember(%item(@char, 1), @pk))) {#DELNITEM char 1}
#IF (@char) {kill %item(@char, 1);#DELNITEM pk %ismember(%item(@char, 1), @pk);#DELNITEM char 1}

Kjata
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net