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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
lanzar
Newbie


Joined: 08 Aug 2010
Posts: 3

PostPosted: Sun Aug 08, 2010 6:37 pm   

setting targets for cmud
 
hello all , i have been out of mudding for a long time , i reciently got back into it and im really having a hard time making a targeting script.
what i had in Zmud was something like this

targ player/mob name
it would then ooc "today my target is palyer/mob name
then i would type "backstab" to set my attack on that target and it would say
"today they will die by my backstab.

then when i scan, thier name would show up in red . if they were north of me it would automaticly go north and attack them with whatever my attack was set to.

if i stalked them as soon as i came in the room it would preform that attack (good for aggro mobs for the first hit).
when all was done i could turn off that scrip by typing player/mod name is dead, and it would say ooc i taught them .


if anyone can help with this it would be great i have been trying and trying to no avail !

thanks =)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Aug 09, 2010 7:53 pm   
 
The following might get you started. At the command line, type the following commands:
Code:

#alias targ {#var target %1;#show my target today is @target}
#alias backstab {#var attackform %1;#show today they will die by my @attackform}
#trigger {@target} {#cw red}

To get it to automatically move north (or whatever), we will need to know exactly what text the mud sends you that tells you that the target is north. I'm not sure what you mean by "if I stalked them as soon as I came in the room". Is "stalk" a command you type? Or what? You will have to send us exact text from the mud to help further.
Reply with quote
lanzar
Newbie


Joined: 08 Aug 2010
Posts: 3

PostPosted: Mon Aug 09, 2010 8:12 pm   
 
Thanks for the info ! will give it a try and let you know
Reply with quote
lanzar
Newbie


Joined: 08 Aug 2010
Posts: 3

PostPosted: Wed Aug 11, 2010 12:40 am   
 
ok now i just cant seem to get the triggers to work ,

it when i tell the mud to scan it takes a quick look for players/mobs in each direction including the room im in Ie,

i type targ drunk
then i use kk for my attackform in this case i want to backstab , so i tt backstab.
then i scan (to look for them )
scan
the mud shows the following

Looking around you see:
the Drunk , right here.
Artur Hawkwing, nearby to the north.
the stray dog, nearby to the east.
the vagabond, nearby to the south.
the drunk, nearby to the west.

then mud now shows me
backstabdrunk all in one word im not sure how to get it to seperate i used the trigger to see the pattern "the Drunk right here." and it see's it just fine its in red like it should but it wont let me seperat the trigger (@attackform @Target) .

once i learn the correct way to seperate the @attackform and the @Target i think i can figure out the rest. i have tried ; : spaces next line . im just stumped on this one

thanks in advance for the help
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Wed Aug 11, 2010 12:51 pm   
 
Click on the Settings button at the top of your main window. This opens the Package Editor window.
In the Package Editor window, find and click on the trigger to select it. The right side of the Package Editor should now show the code for the trigger.
At the bottom of the subwindow showing the code, click the XML tab. This will show the XML version of the code.
Highlight the entire code, including the the <trigger> and </trigger> lines, and type CTRL-C to copy it.
Here in the forums, start a reply to this thread.
In your reply, type: [code]
Then type CTRL-V to paste the code into your reply.
Then type: [/code]
Click the Submit button to send the reply. This will allow us to actually see the code you are talking about. It is nearly impossible for us to debug your code without seeing it. The [code]...[/code] stuff puts the code into a special format in the reply so that the forum doesn't try to automatically rearrange it.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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