|
minish1 Beginner
Joined: 24 Feb 2005 Posts: 23
|
Posted: Tue Apr 05, 2005 12:23 am
help with some scripts |
trying to setup some scripts to keep track of pre-specified targets, and have it enter a command only if all req's are met, for example, here's a fake scenario:
target just arrived. (it adds 1 to my targets variable)
target wanders (adds -1 to targets variable)
killed target (adds -1 to targets variable)
now, i want to 'k @target' every 3.5 seconds ONLY if there are still targets in the room, AND my hp's are above a specified point, more specifically, if hp's get below a certain point, i have trigs to heal myself, how would i have the 'k @target' cycle temporarily disabled, until my hp's are once again in safe range?... hard to explain what i need, hopefully someone will make sense of my drunken ramblings lol |
|
|
|
LogixSR79 Newbie
Joined: 02 Apr 2005 Posts: 4
|
Posted: Tue Apr 05, 2005 1:40 am |
well what i do is this, when i start combat with a mob i set a variable that i am currently fighting, then if something walks in and i am fighting it sets a variable for morecombat when the mob i am currently fighting dies its checks to see if morecombat is true if it is it will look and then attack the next trigger mob and if others are in the room reset the morecombat to true or if there are no more it sets it to false then contines moving throughout the area... as for the health portion, what I do since i don't heal is massrecall which works for my current xp areas just in case i get low, i predefine a low point in my health in which it will do the massrecall and then go to the healer and sleep till fully healed then restart the script... but all it does is check my health everytime the health prompt comes up and if it falls below a certain point you can then set a variable that says "hey i need healing" so when you kill your current mob it will check to see if you need to heal before attacking next mob at which point it will cast heal spells or sleep or whatever, as you are healing your health trigger is now checking to see if you are at a safe health level since you already said i need healing and when your health gets back to a specified point it will set that hey i need healing to false and continue to fight.
|
|
|
|
minish1 Beginner
Joined: 24 Feb 2005 Posts: 23
|
Posted: Tue Apr 05, 2005 5:40 pm |
not really what i was getting at... anyways... another couple questions...
i have auto gold split trigs that worked but the mud i play on changed the grouping coding... currently, i have trigs that when i enable splitting, it enters the command 'party' to the mud, which USED to return text like, People in your group: Tom, Dick, Harry. but now, it lists them like this, Peopl in your group: You (leader), Dick, Harry. or, People in your group: Tom (leader), Dick, Harry. for the sake of this argument, i'll be harry, as opposed to being dick lol, you can see how this would pose a problem with my current triggers, since if im leading, it lists me in the group as 'You (leader)' and if im following someone else, it lists them as (leader) and me in the group... SO long story short, how do i change my trigs so that my trig does NOT include 'You (leader)' in the string of group members, and when it lists someone else, that is a (leader) it drops the (leader) part off? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Apr 05, 2005 9:23 pm |
Quote: |
People in your group: You (leader), Dick, Harry.
|
check the syntax for %remove(), I think I got it all wrong
#trigger {People in your group: (*)} {#variable Groupmembers %remove("%1", " (leader)");#if (%pos("You",@Groupmembers)) {Groupmembers = %replace(@Groupmembers,"You, ","")}} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
minish1 Beginner
Joined: 24 Feb 2005 Posts: 23
|
Posted: Wed Apr 06, 2005 11:09 pm |
kk, cools i'll try that when i get home, many thanks... NOW final question for now hehe, say i have that variable for my group... is there a way to have a trigger that covers any in the group, for example if i have two people in the string list of group memebers, tom and harry, can i have one variable for if Tom attacks 'target' or Harry attacks 'target'... so if any of the people listed in my group do something, it recognizes it? but not a diff trig/variable for each, just one like @group attacks 'target' or something similar?
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Apr 06, 2005 11:20 pm |
yep, but I'll leave it up to you. All you got to do is grab the appropriate game messages and replace the name of the person in the message with {@groupmembers} (including the curly braces).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
minish1 Beginner
Joined: 24 Feb 2005 Posts: 23
|
Posted: Thu Apr 07, 2005 1:02 am |
hmmm... it only works for the first item in the list...
|
|
|
|
minish1 Beginner
Joined: 24 Feb 2005 Posts: 23
|
Posted: Mon Apr 11, 2005 6:07 am |
hmmm ok, i'll be more specific. i have a variable @group. it lists all people in my group in a string. is there a way i can make a trig that recognizes any one of the specific people in my group? for example: the two people in my group are: George, and Ralph. can i make a trig that recognizes george OR ralph do a command?
|
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Apr 11, 2005 10:06 pm |
#TRIGGER {{@group} does something} {say Ill do this!}
|
|
|
|
minish1 Beginner
Joined: 24 Feb 2005 Posts: 23
|
Posted: Tue Apr 12, 2005 1:22 am |
tried that, it only held true for the first item in the list for variable @group, for example, if i have a trigger for @group says hi, and there are two people listed in a string in the variable @group, it only sets off the trig if the first person listed does it
|
|
|
|
Private Adept
Joined: 10 Jan 2002 Posts: 264 Location: USA
|
Posted: Wed Apr 13, 2005 10:39 am |
groupies = Fred|George|Marvin|Someone|Another
#TRIGGER {^(*) does something.$} {#IF %ismember( %1, @groupies) {#SHOW This person is a group member.} {#SHOW I dont recognize this person.}}
#show Fred does something.
#show George does something.
#show Marvin does something.
#show Someone does something.
#show Another does something.
results: This person is a group member.
#show Freddy does something.
#show Jimbob does something.
#show Joeblow does something.
#show Somebody does something.
results: I dont recognize this person.
hope that helps. |
|
|
|
|
|