|
xenapan Wanderer
Joined: 26 May 2004 Posts: 68
|
Posted: Wed Mar 29, 2006 4:33 am
help with repair script? |
Repair all is expensive (adds an extra 10% cost ontop of everything added together) basically i want to fix up a set of triggers to repair the most expensive stuff.
currently im having a problem getting the trigger to:
a) detect the item (notice the scales of alpha & omega have an & symbol)
b) repair the right items by finding the keywords in the object (as i dont want all the junk in my inventory repaired as well. however i generally want to leave it in my inventory)
basically so far i have
^%1 tells you, 'It will cost %2 pieces of gold to repair [this is the part im stuck on]'
how would i get this to work without creating a whole set of triggers for each item individualy? not sure how to get an linked array to work in zmud and the pattern matching is problematic.
samples
Quote: |
Bugelii the blacksmith tells you, 'It will cost 33000 pieces of gold to repair the ring of the ancient gods'
Bugelii the blacksmith tells you, 'It will cost 82500 pieces of gold to repair the ring of the ancient gods'
Bugelii the blacksmith tells you, 'It will cost 10032 pieces of gold to repair maddening voices'
Bugelii the blacksmith tells you, 'It will cost 11550 pieces of gold to repair a blue, glassy chain'
Bugelii the blacksmith tells you, 'It will cost 16500 pieces of gold to repair obsidian leggings'
Bugelii the blacksmith tells you, 'It will cost 198000 pieces of gold to repair Crown of the Ages'
Bugelii the blacksmith tells you, 'It will cost 2 pieces of gold to repair scales of alpha & omega'
Bugelii the blacksmith tells you, 'It will cost 63525 pieces of gold to repair the Ice Girth'
Bugelii the blacksmith tells you, 'It will cost 28824 pieces of gold to repair a Bracer of Light'
Bugelii the blacksmith tells you, 'It will cost 28824 pieces of gold to repair a Bracer of Light'
Bugelii the blacksmith tells you, 'It will cost 66000 pieces of gold to repair Nasr, Claymore of Sovereignty'
Bugelii the blacksmith tells you, 'It will cost 13200 pieces of gold to repair the Breastplate of the Ravager'
|
|
|
_________________ Player on Realms of Despair. realms.game.org port 4000. Join us today! |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Wed Mar 29, 2006 9:17 am |
There are probably many ways to do this and I'm very rusty at scripting, but something like this should work.
#VAR gear {ring|voices|chain|leggings|Crown|scales|Girth|Bracer|Claymore|Breastplate}
#TRIGGER {^* tells you, 'It will cost (%d) pieces of gold to repair *{({@gear})}*'$} {#IF (%1 > 50000) {repair %2}}
Untested, and I can't remember if it is {({@gear})} or ({(@gear)}). Hope this helps. |
|
|
|
|
|
|
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
|
|