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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
OxnyxWS
Newbie


Joined: 23 Oct 2006
Posts: 8

PostPosted: Mon Oct 29, 2007 4:29 am   

Enable Disable Class problem
 
Hi I'm trying to create a Buyer bot for my order. Basicly I want the bot to buy one of a number of items in lots for our players. However I seem to be running into trouble getting the class to enable and disable.
Class Folders
*autolog
*BuyerBot
->LilacHeals
TIGGER on and off LilacHeal Class

Code:

mmm
#WAIT 2000
#CLASS LilacHeal true
list
'Today a Lilac potion cost me @lilac
'So that will be....
'@Heal100 for 100 Lilac potions or @Heal20 for 20 potions

The Varables lilace, Heal100 and Heal20 are in the LilacHeals Class. LilacHeals is disable by default. At this point cMud does not return any values for lilac, Heal100 and Heal20. (Yes, I test it out before sticking in the class enable feature the tiggers in the class work)
Reply with quote
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Mon Oct 29, 2007 5:26 am   
 
Try #T+ LilacHeal and #t- LilacHeal, I've never heard of #class classname true. Also I find it's best not to put variables in a class that gets disabled because they might end up getting recreated somewhere else. Try making your classes like this:
Code:


             ---- LilacHeal_Trigs
LilacHeal --|---- LilacHeal_Aliases
             ---- LilacHeal_Variables


Then just doing #T+ or #T- LilacHeal_Trigs
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Oct 29, 2007 5:45 am   
 
If you want to activate and deactivate a class, use the #t+ and #t- commands, not the #class command. It should be working with that syntax, though, so try copying the XML of the class (the XML tab of the class) and pasting it into a [code] tag here, so we can see the whole script. Could be that there's a problem with #class or with the help file.

EDIT: Argh, ninja'd :(
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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