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
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Tue Jun 24, 2008 6:06 am   

A little help?
 
I play the mud Materia Magica and have been trying to get a script I saw on other sites working properly for me, but am having a bit of trouble.

#VAR practices
#VAR qps
#VAR questsdone
#TRIGGER {As a reward for your valor, I am awarding you %1 quest points, %2 practices, %3 experience points, and %4 gold pieces!} {#add qps %1;#add gponhand %4;#add questsdone 1;#add practices %2;#math EXPTNL (@EXPTNL-%3)} {stats}
#TRIGGER {Practices: %1} {#var practices %1} {stats}
#TRIGGER {Quest Points: %1 ~(%2 quests~)} {@qps = %replace( "%1", ",");@questsdone = %replace( "%2", ",") } {stats}
#TRIGGER {The Powers have noticed thy efforts at betterment, and have rewarded thee!} {score} {stats}
#TRIGGER {You have [%1] practice sessions remaining.} {@practices = %replace("%1", ",")} {stats}
#STAT {Quest Points: @qps (@questsdone completed) Practices: @practices Till Next QP Item ~(@qpitem~): @qpneeded}
#alias qpset {#var qpitem "%1";#var qpcost %2}
#trigger {Quest Points: &qpthous,&qphund ~((%d) quests~)} {#math qptotal ((@qpthous * 1000) + @qphund);#math qpneeded (@qpcost-@qptotal)}
#status {Till Next QP Item ~(@qpitem~): @qpneeded}

#alias {qpset} {#var qpitem "%1";#var qpcost %2}
#var qpitem
#var qpneeded
#var qpcost
#var qptotal

I did not write either script, just looking to make it so that both show up on my status bar.
Also curious on how you get a countdown on how long a fight takes.
Reply with quote
Toxic
Adept


Joined: 27 May 2008
Posts: 299

PostPosted: Tue Jun 24, 2008 1:50 pm   
 
Where are you having issues?

Perhaps show us your MUD output so we can see what might be happening.
Reply with quote
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Tue Jun 24, 2008 7:38 pm   
 


It should be showing Pracs: X Qpts: X (X completed) X qpt Till next QP Item (X) on the bottom bar.


Last edited by Alexiel on Wed Jun 25, 2008 5:48 am; edited 1 time in total
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Jun 25, 2008 4:54 am   
 
Well... if you could give us an image we could actually see/read anything on...
:)
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Wed Jun 25, 2008 5:49 am   
 
Fixed, sorry about that. T
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Wed Jun 25, 2008 9:34 am   
 
Jpeg is naff for images of text. Try png or gif.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jun 25, 2008 9:57 am   
 
The second #STAT command was overwriting the first one. Just enter the first one again.
Code:
#STAT {Quest Points: @qps (@questsdone completed) Practices: @practices Till Next QP Item ~(@qpitem~): @qpneeded}

_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Jun 25, 2008 3:46 pm   
 
Geeze, now why didn't I see that Vij? LOL, I've gotta stop trying to help others when I'm brain frazzled myself from a combination of sleep deprivation and handling my own issues ;)
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Thu Jun 26, 2008 1:12 am   
 
Hrm still not doing the math for the:
X till next QP Item
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Thu Jun 26, 2008 3:03 am   
 
Thats because your trigger patterns are off a little, amongst other things. Let me get some sleep, and I'll re-write it for you to make sense and work. Right now I'm too tired, and I don't intend to make the same mistake twice in the same thread ;)
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Wed Jul 02, 2008 12:55 am   
 
Still having problems with this Sad
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Jul 02, 2008 5:37 pm   
 
Sorry, I got distracted hehehe.

I need quotes of you receiving the following lines:

As a reward for your valor, I am awarding you...
You have ... practice sessions remaining.

And also the FULL output of your score.

I've got the re-write almost completed, just need to see those lines myself before I can finish.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Thu Jul 03, 2008 6:32 am   
 
Score:
Player Information for: Araxia Your sweet Six Six Six
Hours Played: 4,223 Age: 25 years (Born 3/21/1418)
Class Level: 35 Total Level: 215
Race: fey Gender: female
Class: rogue Alignment: 442 (good)
Hit Points: 1610/1637 Practices: 31
Spell Points: 1810/1810 Quest Points: 934 (1343 quests)
Stamina: 1294/1294 Reputation: 100 (Saint)
Strength: 18/18 Vitality: 20/20
Knowledge: 17/20 Luck: 18/18
Wisdom: 19/19 Courage: 18/21
Agility: 18/21 Sanity: 16/17
Personality: 11/17
Spell Complexity Comprehension: 54%
Proficiency Complexity Comprehension:
Wea: 52% Def: 80% Com: 45% Tek: 79% Mys: 97%
* You have 69,843,920 experience points and need 6,156,080 to advance.
* You have killed 36,501 creatures and 7 players in combat.
* You have been killed 471 times, 65 in player kill combat.
* You have defeated 4 players and lost 9 times in arena combat.
* You are carrying 9 items weighing 11 stones and 33 pebbles.
* You have attained 64 marks, 0 honors, and 0 relationships.

Completed Quest line:
As a reward for your valor, I am awarding you X quest points, X practices, X experience points, and X gold pieces!

I had to put X's cause they change per quest
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Thu Jul 03, 2008 12:40 pm   
 
does the reward line ever contain commas in the numbers?
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Thu Jul 03, 2008 1:30 pm   
 
Yes exact line:
You inform Lady Undya you have completed your quest.
Lady Undya tells you, 'Congratulations on the completion of thy quest, Araxia!'
Lady Undya tells you, 'As a reward for thy valor, I am awarding you 72 quest points, 6 practices, and 6,200 gold pieces.'
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Thu Jul 03, 2008 5:58 pm   
 
That's different than what you posted in the other one :p But thats ok, I got it now.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Fri Jul 04, 2008 11:42 pm   
 
Just took another look at this and noticed that your lines are completely different. Does the valor line always contain the same information? Or do different quests report different things? Like one gives xp and gold, another gives QP and pracs...???
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Alexiel
Novice


Joined: 05 Mar 2007
Posts: 33
Location: Paulsboro,NJ

PostPosted: Sat Jul 05, 2008 12:55 am   
 
It can vary, sometimes you only get qpts (if you do all but one part of a quest). that part works fine for me, its the status bar and math that i seem to be having problems with..
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sat Jul 05, 2008 1:15 am   
 
Yes, but I'm doing a total re-write of it, cleaning up a lot of garbage hehe

Its almost done, just need to do the last triggering for this line and I'll post it.

One more question, your lines differ in this way as well: one says "your valor" the other says "thy valor" which is correct? And if it can be different words I'll just replace it with %w... actually I'll just do that period. I'll post it in a minute.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sat Jul 05, 2008 1:16 am   
 
Ok, here it is. If you have any problems, PM me or post here...

Code:
#CLASS {QP Status Bar}
#ALIAS qpset {
  #var qpitem "%1"
  #var qpcost %2
  }
#ALIAS qpmath {#VAR qpneeded %eval( @qps - @qpcost)}
#VAR practices {}
#VAR qps {}
#VAR questsdone {}
#VAR qpitem {}
#VAR qpneeded {}
#VAR qpcost {}
#VAR qptotal {}
#TRIGGER {(%n) quest points} {
  #CLASS {QP Status Bar}
  #add qps %1
  qpmath
  #CLASS 0
  }
#TRIGGER {(%n) practices} {
  #CLASS {QP Status Bar}
  #add practices %1
  #CLASS 0
  }
#TRIGGER {(%n) experience points} {#var EXPTNL %eval( @EXPTNL - %1)}
#TRIGGER {(%n) gold pieces} {#add gponhand %1}
#TRIGGER {As a reward for %w valor} {#add questsdone 1}
#TRIGGER {The Powers have noticed thy efforts at betterment, and have rewarded thee!} {score}
#TRIGGER {You have (%n) practice sessions remaining.} {@practices = %replace( "%1", ",", "")}
#STAT {Quest Points: @qps( @questsdone completed) Practices: @practices Till Next QP Item ~(@qpitem~): @qpneeded}
#CLASS 0
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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