|
jackwest Novice
Joined: 01 Jan 2009 Posts: 35
|
Posted: Thu Jan 01, 2009 11:32 am
couple of noob questions. |
so i decided to throw out my tangled mess of triggers and aliases shared acquired from various websites and start from scratch. as much for the learning experience as anything else.
i've read around as much as i can but keep coming back to other people new to scripting asking the same question and people saying "ask here!"
so i am.
I have 2 issues i wish to ask about.
firstly, buttons.
I've got a trigger which detects a login attempt, notes the character logging in, runs some minor admin stuff, activates that character's #class if it's an existing character or creates a new #class if it's a new character. the basic idea is to have a general set of scripts then a character specific set which is activated as soon as the character log in. all well and good.
where buttons come into it is that upon detecting a new character, i want to automatically generate a new button along the top, basically a push button login button. imagine the top of the cmud window with a line of buttons, one for each alt. so once logged in i can relog a character or switch characters with the click of a button.
so i have a variable, @character_name which is set on login, and a script so if the class doesnt already exists it generates #BU whatever {@character_name} {loginscript}
the problem i have is that the button's name is a variable so as soon as i log in a new character the button name changes to the new character. and i cant for the life of me figure out how to force cmud to resolve the variable to text. i've tried special characters etc..
secondly, #gag.
I have a #class combat mode which is button enabled when i'm preparing to enter combat. one of the functions i want is on every prompt to run a group listing command which shows me everyone's hp etc and then output it to gauges so i can monitor my entire group in near real time.
the problem i have is that #gag doesnt seem to work all the time. i've tested this as much as i can with little test aliases etc... but even something as simple as
say hi
#gag
repeated several times quickly, the say hi will eventually come out. i've tried adding #waits to give the mud time to react etc but it doesnt seem to help much.
this one is a big issue. grouplist information can exceed a page. spam factor is high. and there is a lot of other stuff i want to #gag... help would be welcome.
jack. |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Thu Jan 01, 2009 1:14 pm |
Try taking away the brackets from around @character_name . (You can tell it's working because it should show up as a VARREF instead of a STRING in the compiled code tab for your script that's creating the button.)
|
|
|
|
jackwest Novice
Joined: 01 Jan 2009 Posts: 35
|
Posted: Thu Jan 01, 2009 2:09 pm |
sweet, that worked, thanks.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Jan 05, 2009 3:22 pm |
For the gagging, you probably want to create a separate trigger(s) which catches the specific lines you want to gag. If needed, the trigger could be enabled/disabled when necessary. Does the grouplist information alwasy show in a particular form? or start with a specific line?
By the way, have you considered using separate sessions for your characters? That way you can put your session-specific stuff into each session, and the general stuff into a separate package which is loaded by each session. |
|
|
|
jackwest Novice
Joined: 01 Jan 2009 Posts: 35
|
Posted: Thu Jan 08, 2009 11:45 pm |
thanks for the reply rahab. i see what you're aiming at re #gag, i'll have a go.
re the session vs class thing, i dont have the skills yet to do what i want to do using sessions. i'll work up to it :-)
jack |
|
|
|
|
|