Special Repair All

Play Now

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,969
118
290
Stoke, UK
GetRepairCost 0

Stores the Cost of repairing item "0" (Armour) in variable %P9

Just do that for all of the items and add them together to get the cost.. then

RepairItem 0

Repairs Item "0" (Armour), do that for all items you want repair.
 
Upvote 0

Inflikted

LOMCN Veteran
Veteran
Aug 4, 2003
256
7
94
can you be more specific or possibly go over a small example :)
i am a bit new to variable scripting. would be a nice example, thanks
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,969
118
290
Stoke, UK
Code:
#ACT
GetRepairCost 0
Mov P1  %P9      ;Stores the Value of P9 (Repair Cost) in the Variable P1
GetRepairCost 1
Inc  P1  %P9      ;Increments (Adds) the Value of P9 to P1
GetRepairCost 2
Inc  P1  %P9

Etc

Then When you have finished gathering the cost of all the repairs, (this will be stored in P1) tell them how much it will cost..

Code:
#SAY
This will cost you <$OUTPUT(P1)>\   ;Shows the value of P1
Do you want to repair?\
< Yes /@Blah>\\\

Then Repair it for them (Make sure you check the cost again else they could put on different items just so it would be cheaper during the checking stage)..

Code:
#ACT
RepairItem 0       ;Armour
RepairItem 1       ;Weapon
RepairItem 2       ;Torch I think lol, you won't want to repair this one :P

Etc

I could give you the entire script, but if you are not sure even at a low level, its better to learn it bit by bit.
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,969
118
290
Stoke, UK
Np's m8, nothing is really that hard, its just understanding the Syntax, then your sorted.

Post again if you need a hand with anything, thats what we are here for...
 
Upvote 0

Inflikted

LOMCN Veteran
Veteran
Aug 4, 2003
256
7
94
ah i got stuck onto another little problem :)
so it tabulates the gold amount properly and repairs all my items, but it doesnt charge the user any gold. so he gets free repairs
i tried doing
take <$OUTPUT(P1)> (took away nothing)
and take gold <$OUTPUT(P1)> (this only took away 1 gold)
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,969
118
290
Stoke, UK
I have posted the #IF commands on another thread, not been through this with the #ACT commands yet, but I will one day :P
 
Upvote 0

Demoness

LOMCN n00bie
Nov 15, 2007
6
0
12
LOL i need hlp girls and boys :P if ya dnt mind hlping me for 10mins add me ova msn [email protected] <<<< btw im not 11 im nrly 23 and + im a big girl u look after ill look after if ya know wht i mean ;p plz add me

thnx Demi Bowman
 
Upvote 0

Demoness

LOMCN n00bie
Nov 15, 2007
6
0
12
/MasterQ cant u just tell me were u get files plz i do play ur server more than any other lol im called Mefisto im l lvl 700+ with 3rd rb and i wud like to donate their lol but seen as u neva hardly on :)
 
Upvote 0

idaBigA

Holley Mir 3!!
VIP
Oct 28, 2003
1,969
118
290
Stoke, UK
Sorry, this doesn't work >>

#ACT
GetRepairCost 0
Mov P1 %P9 ;Stores the Value of P9 (Repair Cost) in the Variable P1
GetRepairCost 1
Inc P1 %P9 ;Increments (Adds) the Value of P9 to P1
GetRepairCost 2
Inc P1 %P9
Take Gold %P1

?
 
Upvote 0