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
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Mon Mar 31, 2003 5:12 pm   

skinning script help needed
 
I am trying to get a script to work that when a button is hit gets my skinning knife skins, puts knife away and searches.. so far i have that much working, i am trying to add triggers to see if skinning was successful or not and then grab the skin. when i enter the text it keeps adding a couple sets of brackets that give me a syntax error, when i remove the brackets which seems to correct the syntax and hit save it goes back to the uncorrected state as if i didnt save.

this is what i have that works


#ALIAS fleece {get @skinknife from my @knifecase;skin %1;#ALARM +.5 {put @skinknife in my @knifecase;search %1;look}}

this is what i want to try to change it to (i dont know if this works or not as i havent been able to get past entering)

#ALIAS fleece {get @skinknife from my @knifecase;skin %1}
#TRIGGER {^You skinned the (*)}{#ALARM +.5 {put @skinknife in my @knifecase;search %1;#ALARM +.5 {get %2;open my @skincontainer;put %2 in my @skincontainer;look}}}
#TRIGGER {^You botched the job.}{#ALARM +.5 {put @skinknife in my @knifecase;search %1}}


when i enter that it turns into

#ALIAS fleece {get @skinknife from my @knifecase;skin %1}
#TRIGGER {{^You skinned the (*)}{#ALARM +.5 {put @skinknife in my @knifecase;search %1;#ALARM +.5 {get %2;open my @skincontainer;put %2 in my @skincontainer;look}}}} {}
#TRIGGER {{^You botched the job.}{#ALARM +.5 {put @skinknife in my @knifecase;search %1}}} {}


any clue would be much apprectated

Nazardin
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Mon Mar 31, 2003 6:20 pm   
 
Try putting spaces in between an ending and starting bracket...

Like this:} {
NOT like this: }{
Reply with quote
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Mon Mar 31, 2003 6:55 pm   
 
quote:

Try putting spaces in between an ending and starting bracket...

Like this:} {
NOT like this: }{





carnt beleive it was that easy thanks very much.

i have buttons set as

fleece @monster1 @monster1skin
fleece @monster2 @monster2skin etc

is %2 the wrong variable to use? I am getting get what message when the script gets to getting the skin
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Mon Mar 31, 2003 8:53 pm   
 
Ok, there is no %2 to grab in your triggers... I'm assuming you want the second argument from the Alias??? If so, assign %2 to a variable in your alias, then use the variable name in the trigger instead of %2
Reply with quote
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Wed Apr 02, 2003 3:07 am   
 
quote:

Ok, there is no %2 to grab in your triggers... I'm assuming you want the second argument from the Alias??? If so, assign %2 to a variable in your alias, then use the variable name in the trigger instead of %2






got it with some help from Shalimar this works great now

#CLASS {Gemstone|Skin}
#ALIAS fleece {monster = %1;skin = %2;get @skinknife from my @knifecase;skin @monster}
#TRIGGER {You skinned (*).} {#ALARM +.5 {put @skinknife in my @knifecase;search @monster;#ALARM +.5 {#ALARM +.5 {look};open my @skincontainer;get @skin;put @skin in my @skincontainer;#ALARM +.5 {close my @skincontainer;look}}}}
#TRIGGER {You botched the job.} {#ALARM +.5 {put @skinknife in my @knifecase;search @monster}}
#BUTTON 37 {skin} {fleece urgh hide} {} {} {} {} {} {Size} {40} {17} {Pos} {1} {665} {} {} {} {} "" {} {skins monster} {} {3}
#BUTTON 38 {skin} {fleece bear hide} {} {} {} {} {} {Size} {40} {17} {Pos} {18} {665} {} {} {} {} "" {} {skins monster2} {} {3}
#BUTTON 39 {skin} {fleece leopard paw} {} {} {} {} {} {Size} {40} {17} {Pos} {35} {665} {} {} {} {} "" {} {skin monster3} {} {3}
#CLASS 0


#CLASS {Gemstone|Variables}
#VAR skinknife {knife} {knife}
#VAR knifecase {quiver} {quiver}
#VAR monster1 {bear} {bear}
#VAR monster2 {leopard} {leopard}
#VAR monster3 {troll} {troll}
#VAR skincontainer {longcoat} {longcoat}
#CLASS 0
Reply with quote
Talahaski
Enchanter


Joined: 10 Oct 2000
Posts: 656
Location: USA

PostPosted: Wed Apr 02, 2003 3:50 pm   
 
nazradin, what Mud are use using this for. Looks like the same Mud I play. I've also built a similar script for my Mud, but I've gone about it a different way.

Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.55a
Zmapper Version 1.14

http://www.dartmud.com
Reply with quote
nazradin
Apprentice


Joined: 23 Mar 2003
Posts: 114
Location: New Zealand

PostPosted: Thu Apr 03, 2003 4:58 pm   
 
[quote]
nazradin, what Mud are use using this for. Looks like the same Mud I play. I've also built a similar script for my Mud, but I've gone about it a different way.


:::::::::::::::::::::


gemstone 3 (cough 4)


nazradin
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