|
D0nut |
Posted: Wed Jul 04, 2007 5:12 am
Newbie question |
|
D0nut Beginner
Joined: 04 Jul 2007 Posts: 23
|
Posted: Thu Jul 05, 2007 9:55 pm |
Is something like this already in the script, though? The original one had a MaxGP value.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Jul 05, 2007 10:12 pm |
It wasn't setting the value, it was taking it from a variable that I assumed you'd be creating. You can replace @gp with %mud.gp I think, but you'll need to get @MaxGP yourself.
|
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Thu Jul 05, 2007 10:14 pm |
The original one from Fang required YOU to supply the correct variable for max/current Gp.
Since you couldn't, and were unclear on what was going on, I supplied a script that might work without access to current/map Gp.
Now you've got the variable, pop it into Fang's script. |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
D0nut Beginner
Joined: 04 Jul 2007 Posts: 23
|
Posted: Fri Jul 06, 2007 12:34 am |
Fang Xianfu wrote: |
It wasn't setting the value, it was taking it from a variable that I assumed you'd be creating. You can replace @gp with %mud.gp I think, but you'll need to get @MaxGP yourself. |
How would I do that? The @MaxGP value increases by itself as the skills are practiced with no input from the user. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Jul 06, 2007 1:40 am |
Isn't it displayed on the prompt or in your SCORE or somewhere? You can just have a trigger that picks out the relevant value from your prompt or score and writes the value to a variable.
|
|
|
|
D0nut Beginner
Joined: 04 Jul 2007 Posts: 23
|
Posted: Fri Jul 06, 2007 2:33 am |
Ok, you realize I know next to nothing about scripting right?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Jul 06, 2007 2:41 am |
Indeed, but like as has been said so many times before, there's little we can do without more information about your specific problem. MUD output text is the best bet, because we can then use that text to create and test the trigger.
|
|
|
|
D0nut Beginner
Joined: 04 Jul 2007 Posts: 23
|
Posted: Fri Jul 06, 2007 2:48 am |
Well what output do you need now...
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri Jul 06, 2007 2:53 am |
Well, I don't know since I don't know where you can get the MaxGP info. Anything that contains the MaxGP number - prompt, score, whatever.
|
|
|
|
D0nut Beginner
Joined: 04 Jul 2007 Posts: 23
|
Posted: Fri Jul 06, 2007 3:22 am |
Well there's score, and score brief commands. Here are my current variable values for both:
score:
You have 1339 (1339) hit points, 88 (240) guild points, 36 (643) quest points
and 112 (112) social points.
Your current experience is 215301 and you are level 72 in the Wizard's Guild; your
overall rating is 8544.
score brief:
Hp: 1339(1339) Gp: 88(240) Xp: 215304 Burden: 11%
The numbers in brackets are max, numbers outside are current value. But like I said, it regenerates by itself. Gp gets from 0 to max in roughly 3-4 minutes. The problem is that the Gp max value keeps increasing. Just yesterday it was at 238. How do you incorporate that into a script? |
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Fri Jul 06, 2007 4:03 am |
#TR {H: %d~(%d~) Gp: %d~((%d)~) Xp: %d Burden: %d~%} {MaxGp=%1}
Whenever something happens to raise the MaxGp, "score brief" will change the value of your MaxGp variable.
In the script, this means that if casting a certain spell will raise it, then you should "cast spell;score brief" |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
D0nut Beginner
Joined: 04 Jul 2007 Posts: 23
|
Posted: Fri Jul 06, 2007 4:48 am |
So how do I implement it? Is this a separate trigger, or should I put it with the other? And is {H: %d~(%d~) Gp: %d~((%d)~) Xp: %d Burden: %d~%} pattern and {MaxGp=%1} script? Or am I just confused...but it isn't like a prompt, you have to type score brief manually, so how exactly would this work?
Also not sure, but is this a typo? This:
#TR {H: %d~(%d~) Gp: %d~((%d)~) Xp: %d Burden: %d~%} {MaxGp=%1}
should be this:
#TR {Hp: %d~(%d~) Gp: %d~((%d)~) Xp: %d Burden: %d~%} {MaxGp=%1}
?
Could be wrong though, like I said, not much of a scripter...would appreciate if someone could answer this. |
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Fri Jul 06, 2007 7:39 am |
I did say this in my very first reply:
#TR {Pattern} {Commands}
Yes, its a typo. If you look carefully you should be able to figure out what everything means. I left it vague on purpose, because you are new to this and its the best way to learn. Do you understand what %d means? The ~ character forces cmud to treat the ( ) as text characters, rather than special scripting characters. So looking at the instance of ~((%d)~) as opposed to ~(%d~), can you figure out why I put the difference there?
Lastly, yes its a separate trigger. |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
D0nut Beginner
Joined: 04 Jul 2007 Posts: 23
|
Posted: Sat Jul 07, 2007 12:12 am |
OK, I'm still kind of confused. Do I need to put the gp %mud.gp var in fang's script, and where does it go? Just replacing the first 2 values, or more?
|
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sat Jul 07, 2007 12:53 am |
The way I understand this is so.
You type "score brief" and get
Hp: 1339(1339) Gp: 88(240) Xp: 215304 Burden: 11%
You can make a trigger with this line
Code: |
#trigger {^HP: (%d)~(%d)~) Gp: (%d)~(%d~)$}
|
This is the line that will capture your Gp data each time you'll type score brief. It does it the following way:
gp_current=%3
gp_max=%4
numbers 3 and 4 correspond to third and fifth "%d" in the trigger line above.
Now all this connected to one line of code is this:
Code: |
#trigger {^HP: (%d)~(%d)~) Gp: (%d)~(%d~)$} {gp_current=%3;gq_max=%4}
|
I don't know if thats what you meant, though. Next you can do gauge buttons for example which would show the amount of gq current and gp max each time you'll type "score brief".
Hope it helps.
Prog |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Jul 07, 2007 1:57 pm |
It seems that gauges are automatically created through MXP on this mud, prog. You can certainly do it that way with the correct pattern:
#trigger {^HP: (%d)~((%d)~) Gp: (%d)~((%d)~)$} {gp_current=%3;gp_max=%4}
and not
#trigger {^HP: (%d)~(%d)~) Gp: (%d)~(%d~)$} {gp_current=%3;gp_max=%4}
But you can also just use %mud.gp wherever I've used @Gp. There should be some sort of max gp variable too, if there's a gauge for it. |
|
|
|
Progonoi Magician
Joined: 28 Jan 2007 Posts: 430
|
Posted: Sat Jul 07, 2007 2:11 pm |
Blah, next time I'll try to avoid writing codes early morning before going to sleep :P
Prog |
|
_________________ The Proud new owner of CMud.
--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
-------------------------------- |
|
|
|
|
|