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 Goto page Previous  1, 2, 3  Next
Mr. Sasavicz Posted: Sun Apr 29, 2007 1:44 pm
CPPIG help
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Thu May 03, 2007 6:31 am   
 
Quote:

(Hp:337/337)(Mp:154/206)(Mv:351/351)[---SW-]{-6702589}
[none:none]*[none:none]
<Ali:-1000><Ac:-33>

thats my entire prompt.



Code:


#trig {HP:~((%d)/(%d)~)~(Mp:(%d)/(%d)~)~(Mv:(%d)/(%d)~)} {set your variables}



check if ~ whereever is CHECKED, otherwise IT WON'T WORK.


Prog
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Thu May 03, 2007 11:24 pm   
 
READ MY WORDS!!
If that is checked, it fails the TEST and does not work!
if it is unchecked it [passes the test and still does not work :(


{#VA HP %1; #VA HPMAX %2; #VA MP %3; #VA MPMAX %4; #VA MV %5; #VA MVMAX %6;}

thats the variable line I guess
I have even tried putting it on its own trigger line
is this the correct form of the variable line?
I have out it directly behind the trigger for the prompt.


Last edited by Mr. Sasavicz on Thu May 03, 2007 11:36 pm; edited 1 time in total
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Thu May 03, 2007 11:35 pm   
 
The problem is the / characters. Aren't they a special character in perl regex syntax, for modifiers or something? Anyway, zMUD doesn't quote them out on its own, judging by the regex it gives on the test tab - you need to do it manually. Change the pattern to "HP:~((%d)~/(%d)~)~(Mp:(%d)~/(%d)~)~(Mv:(%d)~/(%d)~)" and the trigger fires with that example you gave.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Thu May 03, 2007 11:37 pm   
 
I tried that once too I think :( I will go mess with it again i edited my above post for you more info
I have even put the variables in the text box to try it there still nothing

I even tried doing ~: to try and filter out the :
still nothing


heres the entire trigger line

#TR {HP:~((%d)~/(%d)~)~(Mp:(%d)~/(%d)~)~(Mv:(%d)~/(%d)~)}{#VAR HP %1;#VAR HPMAX %2;#VAR MP %3;#VAR MPMAX %4;#VAR MV %5;#VAR MVMAX %6}
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Fri May 04, 2007 12:06 am   
 
The start of the pattern prognoi gave you is wrong, it doesn't match the text. The bracket is before where it says Hp, and the p isn't capitalised, though that shouldn't make a difference since case sensitivity is off by default. I caught this by entering your pattern into a blank trigger and going onto the test tab - zMUD generates the most simple line that'll match your trigger when you go onto that tab. I then compared the zMUD-generated line (top) with your example pattern (bottom) and the difference is obvious:

HP:(123/123)(Mp:123/123)(Mv:123/123)
(Hp:337/337)(Mp:154/206)(Mv:351/351)

In short, try this instead:

~(Hp:(%d)~/(%d)~)~(Mp:(%d)~/(%d)~)~(Mv:(%d)~/(%d)~)

Sorry I didn't catch this before, I screwed up - once I'd confirmed that prognoi's pattern didn't match, I went onto the pattern tab to quote out the slashes. When I returned, I assumed my test text would be the same, and it wasn't - zMUD had generated a new, matching pattern. This one definitely works, just make sure you don't catch a space on the end.
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Fri May 04, 2007 12:12 am   
 
Yeah, it was really early morning and while being sleepy I misplaced the first (. Having p or P shouldn't matter though unless case sensitivity is on.

Hopefully it will work out now.


Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Fri May 04, 2007 12:19 am   
 
it now matches but the grafic displays nothing
I think ill go find a bridge.....

I have put this line
{#VA HP %1; #VA HPMAX %2; #VA MP %3; #VA MPMAX %4; #VA MV %5; #VA MVMAX %6;}
directly behind the 1st line you guys just gave me and in the value box and I get nothing


Last edited by Mr. Sasavicz on Fri May 04, 2007 12:25 am; edited 1 time in total
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Fri May 04, 2007 12:24 am   
 
I don't think you mentioned anything about graphic displays. I'm sure we can help with that too after a couple of pages ;)
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Fri May 04, 2007 12:26 am   
 
oh yea go to the downloads and get the cppig one and check it out u can make a hp bar to see
thats what alll this crazieness is about lolol
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Fri May 04, 2007 12:47 am   
 
I couldn't find any information on this CPPIG thing. This thread was the highest google response and it swiftly got onto pig dissection.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Fri May 04, 2007 1:07 am   
 
Its downloadable from this site is all I know :(
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Fri May 04, 2007 1:24 am   
 
Well, I couldn't find a post offering it for download, but I did find this:

LightBulb wrote:
You probably shouldn't use it [the CPPIG plugin]. It was designed for earlier versions which didn't have Gauge buttons or Status windows. It isn't needed for version 6.10 or later.


You can probably use zMUD's own gauge button objects.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Fri May 04, 2007 1:25 am   
 
OMG where are they in the 7.21 version!!
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Fri May 04, 2007 1:37 am   
 
What does it actually do, other than add gauges and status bars? Pure zMUD has both of those things now. If there's some other feature it has that you want, requesting it could get it into CMUD.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Fri May 04, 2007 2:03 am   
 
Fang Xianfu wrote:
What does it actually do, other than add gauges and status bars? Pure zMUD has both of those things now. If there's some other feature it has that you want, requesting it could get it into CMUD.


where are these I will just use them I dont know where they are I cant find them :(
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri May 04, 2007 2:07 am   
 
Gauges are a subtype of the button object.

Create a new button in the settings editor change it's type to guage and fill in the required variables.
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Fri May 04, 2007 2:10 am   
 
Just choose New... Status Bar from the GUI of the settings editor and fill out whatever you want to appear. Gauges are a bit more complicated - create a button object. Change the Kind to Gauge and a new tab will appear. All the boxes have hover-over tooltips that should explain what they're for, but if you need any more help, just ask.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Fri May 04, 2007 2:17 am   
 
Fang Xianfu wrote:
Just choose New... Status Bar from the GUI of the settings editor and fill out whatever you want to appear. Gauges are a bit more complicated - create a button object. Change the Kind to Gauge and a new tab will appear. All the boxes have hover-over tooltips that should explain what they're for, but if you need any more help, just ask.


I cant find GUI anywhere in settings
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Fri May 04, 2007 2:24 am   
 
I mean the actual settings editor interface, as opposed to zScript commands that create settings. Once you've clicked Settings on the main zMUD toolbar, there's a button labelled New on the settings editor window. You can choose Button or Status Bar from the list that pops up.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Fri May 04, 2007 2:34 am   
 
Ok I found that what do you input to amke it the same code we have been talking about in this thread?

Is there a help thread for making these somewhere with a step-by-step I am clueless about this :(
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri May 04, 2007 3:27 am   
 
Making gauges in ZMud:

1)open up settings editor, navigate to class folder you want the button to appear in
2)select New Button from the New... button
3)set button kind to Gauge via the dropdown box, fill in Caption and stuff you want the button to do. Gauge will be horizontal if width > height, vertical if width is less than or equal to height (if you make width = height, the gauge looks a little buggy).
4)click on Position/Size tab, make changes there as desired
5)OPTIONAL: click on Advanced tab and set ID and other options as desired
6)click on Gauge tab
--Value = variable containing your current HP

--Gauge Max = variable containing your max HP

--Gauge Low = variable containing your max HP / 4 (<--that's to set Gauge Low to the %25 mark, adjust as necessary or set to zero if you don't want the Gauge Low effect)

--Gauge Color = color of the "full" portion of the gauge (anything to the left (or bottom, if you have it configured vertically) of Value <---gauge color----Value--------Gauge Max>)

--Low Color = Gauge Color when Gauge Low kicks in (<---gauge low----Value--------Gauge Max>)

--Gauge Bckg = color of the unfilled portion of the gauge (anything to the right of Value <---gauge color----Value---gauge bckg-----Gauge Max>)

There are couple other things in the Advanced tab, but the above is a quick and dirty way to create a gauge.
_________________
EDIT: I didn't like my old signature
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Fri May 04, 2007 10:56 pm   
 
MattLofton wrote:
Making gauges in ZMud:

1)open up settings editor, navigate to class folder you want the button to appear in
2)select New Button from the New... button
3)set button kind to Gauge via the dropdown box, fill in Caption and stuff you want the button to do. Gauge will be horizontal if width > height, vertical if width is less than or equal to height (if you make width = height, the gauge looks a little buggy).
4)click on Position/Size tab, make changes there as desired
5)OPTIONAL: click on Advanced tab and set ID and other options as desired
6)click on Gauge tab
--Value = variable containing your current HP

--Gauge Max = variable containing your max HP

--Gauge Low = variable containing your max HP / 4 (<--that's to set Gauge Low to the %25 mark, adjust as necessary or set to zero if you don't want the Gauge Low effect)

--Gauge Color = color of the "full" portion of the gauge (anything to the left (or bottom, if you have it configured vertically) of Value <---gauge color----Value--------Gauge Max>)

--Low Color = Gauge Color when Gauge Low kicks in (<---gauge low----Value--------Gauge Max>)

--Gauge Bckg = color of the unfilled portion of the gauge (anything to the right of Value <---gauge color----Value---gauge bckg-----Gauge Max>)

There are couple other things in the Advanced tab, but the above is a quick and dirty way to create a gauge.


I am with you up to the variables thing how do I make/set these?
I am sorry I know nothing about all this stuff I just have used zMUD all these years to just log in and play never did and speed walking/triggers/mapping. I have used aliases only :(
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat May 05, 2007 1:28 am   
 
Go back to the New... button. One of the options is for variables (which you should have noticed if you were able to make a button.) ;)

When writing code, you can also use the #VARIABLE command or the A = B syntax:

#variable MyVar "Stuff"
MyVar = "Stuff"
_________________
EDIT: I didn't like my old signature
Reply with quote
Mr. Sasavicz
Novice


Joined: 11 Mar 2002
Posts: 37
Location: USA

PostPosted: Sat May 05, 2007 3:32 am   
 
HUH?!

totally lost again


(Hp:386/408)(Mp:168/216)(Mv:372/372)
theres my prompt
what to I do put where to make the buttons work
what do I type in the button fields
what do I type into this alias stuff you are talking about now
I have been putting stuff in there for the 7 hours I have been home from work
nothing I do does anything to these buttons they got me to make
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat May 05, 2007 5:17 pm   
 
Well you said yourself that you had this as the trigger script:

#VA HP %1; #VA HPMAX %2; #VA MP %3; #VA MPMAX %4; #VA MV %5; #VA MVMAX %6

This will create variables for each of those things. Then, for example, you'd set the value of your hp gauge to @HP, the max to @HPMAX, and the low to @HPMAX/4
_________________
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 » zMUD General Discussion All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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