|
kent Beginner
Joined: 03 Apr 2006 Posts: 29
|
Posted: Thu Apr 13, 2006 3:43 pm
RootsNTourms counter |
this program is suppose to pick up (x) amount of tourms and roots (malef) and add the total items found or gotten from a corpse to the counter instead of increamenting by 1
i.e. ( 3) A fist-sized, shiny black stone has been uncovered here.
This is the same for the malef
#CLASS {RootsNTourms}
#TRIGGER {(%d) A fist-sized, shiny black stone has been uncovered here.} {
TourmsGathered = %replace( "%1")
#MATH TourmsGathered {%1 + 1}
get %1.tourm
open @container2
open 2.@container2
open @container3
open 2.@container3
open 3.@container2
put %1.tourm @container2
put %1.tourm 2.@container2
put %1.tourm @container3
put %1.tourm 2.@container3
put %1.tourm 3.@container2
close @container2
close @container3
close 2.@container3
close 2.@container2
}
#TRIGGER {(%d) A gnarled and blackened root is on the ground.} {
RootsGathered = %replace( "%1")
#MATH RootsGathered {%1 + 1}
get %1.malef
open @container2
open 2.@container2
open @container3
open 2.@container3
open 3.@container2
put %1.malef @container2
put %1.malef 2.@container2
put %1.malef @container3
put %1.malef 2.@container3
put %1.malef 3.@container2
close @container2
close @container3
close 2.@container3
close 2.@container2
close 3.@container2
}
#TRIGGER {You take (%d) a black tourmaline from the corpse} {
TourmsGathered = %replace( "%1", ",")
#MATH TourmsGathered {%1 + 1}
#MATH NPC_Killed (@NPC_Killed + 1)
}
#TRIGGER {You take (%d) a maleficarum root from the corpse} {
RootsGathered = %replace( "%1", ",")
#MATH RootsGathered {%1 + 1}
#MATH NPC_Killed (@NPC_Killed + 1)
}
#CLASS 0 |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Thu Apr 13, 2006 8:25 pm |
If you want to accumulate the number gathered, wouldn't you want to use #MATH TourmsGathered {@TourmsGathered + %1} instead of what you are using?
|
|
|
|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Fri Apr 14, 2006 2:48 am |
Yeah this tends to be for Materiamagica MUD.
That whole script needs reworking. Use Multi State Triggers and IF functions if you need to and cut down on open bag open trunk open 2.trunk etc. Make a @container string list or something with your entire list in there and then do checks and remove them from the list if they are full. YOu will find this lags you a lot less
You might also check between aodojo mminfo pkzone and a couple others as there are numerous root and tourm counters. |
|
_________________ Confucious say "Bugs in Programs need Hammer" |
|
|
|
edb6377 Magician
Joined: 29 Nov 2005 Posts: 482
|
Posted: Fri Apr 14, 2006 3:18 am |
Decided i would show you a sample of what im talking about.. Although im sure this script could be improved.
The goal is for you to see an example of something that works and doesnt lag you down really bad. Tourming/Rooting can get pretty big when you are picking up 13 of this and then trying to stick them in 5 different bags.
Have it cycle bags. If it says This bag is full then remove it from your container list so it wont try it anymore. Basically it will fill your bags in the order you choose. Heres a quick example. Forgive me lol i wrote this in about 3 minutes but its closer to what i was thinking of. Ill find my code i saved from when i did it. Although i know i posted mine on a few websites. There are more ways to cut it down using ({Malefecarum Root|black tourmaline}) in the triggers but id have to see how i handled that. My final script is a decent size if i remember right but its like the autospell ups i have done. It handles just about every situation and tracks it. I cant wait for CMUD lol.
Code: |
#TRIGGER {^You take (%d) a maleficarum root from the corpse} {#var RootsGathered {@rootsgathered+%1}};open %item(@container,1);put all.root %item( @container, 1);close %item(@container,1)}
#TRIGGER {^The master of clans tells you 'Thank you for the (*) gem} {#var rootsgathered {@rootsgathered - %1}}
#TRIGGER {^A maleficarum root crackles and burns!} {#var rootsgathered {@rootsgathered - 1}}
#TRIGGER {You take a maleficarum root from the corpse of *} {#var RootsGathered {@rootsgathered+1}};open %item(@container,1);put all.root %item( @container, 1);close %item(@container,1)}
#TRIGGER {(%d) A gnarled and blackened root is on the ground.} {#var RootsGathered {@rootsgathered+%1}};open %item(@container,1);get all.root;put all.root %item( @container, 1);close %item(@container,1)}
#TRIGGER {^You aren't carrying anything that will fit into {a|an} (*).} {#var @Container %delitem(%item(@container,1),@container);open %item(@container,1);put all.root %item(@container,1);close %item(@container,1)}
#VARIABLE container {cloud|2.cloud|trunk|2.trunk|3.trunk}
|
|
|
|
|
|
|
|
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
|
|