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
TiJayO
Newbie


Joined: 07 Mar 2009
Posts: 4

PostPosted: Sat Mar 07, 2009 5:57 pm   

scripting help...so lost...
 
Ok, so I'm trying to get my prompt in the status line...i've set it up as such:

Alias:
gagprompt {prompt prompt %h %H %m %M %v %V %T %w %W %l %L %n}

(Prompt line shows as:
prompt 4907 4907 616 616 3337 3337 2067 - - 457 700
as 4907 is hit points, 616 is mana, 3337 is movements, 2067 is TNL - is moniter target's hp, 457 is weight carried, 700 is max carry)
)

Trigger:
^(%*)prompt (%d) (%d) (%d) (%d) (%d) (%d) (%d) (%*) (%*) (%d) (%d)
#ga
#if {%pos(AFK,%1)} {#no} {#no}
#st {%if( %8<150, ~<LEVEL GEAR~>)%1 %2/%3hp" " %4/%5m " " %6/%7mv " " %9/%10mon " " %11/%12 lb " " (%8)

i want it to show in the status window
<AFK> 4907/4907hp 616/616m 3337/3337mv -/-mon 457/700 lb (2067)
/\
|
If afk

The issue i'm getting is when I get the prompt to show correctly in the mud window, it shows on the status window like this:
" / hp / m / mv / mon / lb ()"

and every time my gagged prompt shows on the mud window, it repeats...before 3 rounds my status bar looks like this:
" / hp / m / mv / mon / lb () / hp / m / mv / mon / lb () / hp / m / mv / mon / lb ()"

now...I can delete all of the status lines in the editer, but there are 2 issues - i don't want to do that every new line, and they don't even have the numbers in them..HELP!!! lol

Thanks in advance, let me know if there is anything else I can tell you.
Reply with quote
TiJayO
Newbie


Joined: 07 Mar 2009
Posts: 4

PostPosted: Sat Mar 07, 2009 6:01 pm   
 
another new issue - when i tried to redo the trigger, it shows:
ERROR: Trigger "(%*)prompt (%d) (%d) (%d) (%d) (%d) (%d) (%d) (%*) (%*) (%d) (%d)" fired but did not compile
Reply with quote
TiJayO
Newbie


Joined: 07 Mar 2009
Posts: 4

PostPosted: Sun Mar 08, 2009 6:55 pm   
 
so many views...not so many helps :'(
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: Sun Mar 08, 2009 11:52 pm   
 
We'd probably be able to help you better if you copied and pasted in the XML for your trigger, it's kind of difficult to read right now.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Mar 09, 2009 11:14 am   
 
What you want to do is make seperate status settings for various parts of the bar once and only once. Such as:
#st {%if(@TNL<150, "")}
#st {@PromptFlag" "}
#st {@HP"/"@HPMax}
etc.
The display of each status setting is updated when variables it contains change. I might even go so far as to break the HP one down to each variable. This is better then making a single item containing multiple variables because the change of any 1 of those variables causes the entire setting to be reproduced.

Then in your prompt trigger:
TNL=%8
PromptFlag=%1
HP=%2
HPMax=%3
etc.

You could continue to do what you are currently doing by using the ID parameter to the #STATUS command. This would cause the new status setting to overwrite the old one. You will likely find that you want variables for those values later making it better to set it up this way.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
TiJay
Beginner


Joined: 15 Aug 2004
Posts: 13

PostPosted: Wed Mar 18, 2009 8:42 pm   
 
This is the code that I used:

#AL {gagprompt} {prompt prompt %h %H %m %M %v %V %T %w %W %l %L %n}
#TR {^(%*)prompt (%d) (%d) (%d) (%d) (%d) (%d) (%d) (%*) (%*) (%d) (%d)} {#ga;#if {%pos(AFK,%1)} {#no} {#no};#st {%if( %8<150, ~<LEVEL GEAR~>)%1 %2/%3hp" " %4/%5m " " %6/%7mv " " %9/%10mon " " %11/%12 lb " " (%8)}

With that i get all the extra status thingies, and no numbers...

First issue i have before all of that is when i type gagprompt, it doesn't put the entire prompt...

It puts:
prompt 2289 5372 3658 3663 1877 - -

I want:
prompt 2299 5372 436 672 3663 3663 1877 - - 518 600

Then, with that trigger, it shows:
ERROR: Trigger "^(%*)prompt (%d) (%d) (%d) (%d) (%d) (%d) (%d) (%*) (%*) (%d) (%d)" fired but did not compile

I am now editing the #ST for variables, will let you know what happens...
Reply with quote
TiJay
Beginner


Joined: 15 Aug 2004
Posts: 13

PostPosted: Wed Mar 18, 2009 8:59 pm   
 
Ok, update:

I replaced the trigger with:

#ga
#var flag %1
#var hpc %2
#var hpm %3
#var mnc %4
#var mnm %5
#var mvc %6
#var mvm %7
#var monc %9
#var monm %10
#var lbc %11
#var lbm %12
#var TNL %8

as the guts...the #ST is working properly now, thanks for the @var suggestion...I've got another question, but since it's a different script altogether, I will post in another thread...
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