[CD3.55] change olds rusts antiques..

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
does anyone know of a script that is on an npc that can check how many olds rusts and antique items a player has in bag and can remove them all at one click of a button and exchange them for famepoints?


dont really want to start making a longwinded script that checks each old rust etc..
 

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
anyone have an working example that i could look at so i know what to do please?

---------- Post Merged on 26-11-2012 at 10:17 PM ---------- Previous Post was on 25-11-2012 at 06:12 PM ----------

been messing with this script but run into a problem.....
#

;;不要删掉此行
[@main]
#IF
Checkfame
MOV D4 %P9
#SAY
What do you wish to do?\
<Turn in (OLD) items/@turn1>\
<Turn in (RUST) items/@turn2>\
<Turn in (ANTIQ) items/@turn3>\
<Exit/@exit>\\


[@turn1]
#ACT
mov A1 %Inputstr
goto @turn00




[@turn00]
#SAY
Please input how many (OLD's) you have.\
<Go/@turn01>\
<Exit/@exit>\\


[@turn01()]
#IF
CHECKITEM SOULRULERRING(OLD) 1
!CHECKITEM SOULRULERRING(OLD) 100
#ACT
TAKE SOULRULERRING(old) ; HOW TO CHECK IF HAVE 1 OR 100 AUTOMATICALLY
MOV D4 %P9
INC D4 300 ; HOW TO ADD 300 FP PER OLD AUTOMATICALLY
SETFAME %D4
#SAY
Here you are kind sir.\
<Exit/@exit>\\
#ELSESAY
You liar!\
<Sorry,I am ashamed/@exit>\\


;;不要删掉此行
 
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
I don't think there is a way of checking exactly how many someone has, I found the best option, was to have them enter an amount and then have the script check if that amount is correct and then give fame accordingly. I'll try to find this script if I can, but no idea where my old mir files are lol.
 
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
Here you have man. I dont test, but maybe works. GL

Code:
[@Main]
#IF
Checkfame
#ACT
Mov D4 %P9
#SAY
What do you wish to do?\
<Turn in (OLD) items/@@turn1>\
<Turn in (RUST) items/@@turn2>\
<Turn in (ANTIQ) items/@@turn3>\
<Exit/@exit>\\

[@@turn1]
#ACT
Mov D1 %INPUTNUM
goto @checkturn1

[@checturn1]
#IF
Equal D1 ""
#SAY
You have to write the amount.\
<Turn in (OLD) items/@@turn1>\
<Exit/@exit>\
#ELSEACT
goto @nextturn1

[@nextturn1]
#IF
checkitem SoulRulerRing(Old) %D1
#ACT
Mov P2 %D1
Mov P3 300
Mul P2 P3
Mov D3 %P9
Inc D4 %P9
Setfame %D4
take SoulRulerRing(Old) %D1
#ELSESAY
You do not have this amount.\
<Exit/@exit>\

Regards,
 
Last edited:
Upvote 0

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
tried that one yolom, pop up message asks how many want to trade, i enter number and doesnt do anything. doesnt remove items from bag or give required fp
 
Upvote 0

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
[@nextturn1]
#IF
checkitem SoulRulerRing(Old) %D1
#ACT
Mov P2 %D1
Mov P3 300
Mul P2 P3
take SoulRulerRing(Old) %D1
Mov D4 %P9
Inc D4 %P9
SETFAME %D4
#ELSESAY
You do not have this amount.\
<Exit/@exit>\

where do i make it give 300 famepoints per old item taken please?

tried here
Inc D4 300
SETFAME %D4

but just gives 300 fp if i have 10 olds in bag shud give 3000 fp
 
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
Tested and it works!

Code:
[@main]
#IF
#SAY
What do you wish to do?\
<Turn in (OLD) items/@@turn1>\
<Turn in (Rust) items/@@turn2>\
<Turn in (Antiq) items/@@turn3>\
<Exit/@exit>\

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;OLD ITEMS                                            
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


[@@turn1]
#ACT
Mov D1 %INPUTNUM
goto @checkturn1


[@checkturn1]
#IF
Equal D1 ""
#SAY
You have to write the amount.\
<Turn in (Old) items/@@turn1>\

<Exit/@exit>\
#ELSEACT
goto @nextturn1


[@nextturn1]
#IF
checkitem SoulRulerRing(Old) %D1
#ACT
Mov P2 %D1
Mov P3 300
Mul P2 P3
Mov D3 %P9
take SoulRulerRing(Old) %D1
goto @givefp
#ELSESAY
You do not have this amount.\
<Exit/@exit>\

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;RUST ITEMS                                            
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@@turn2]
#ACT
Mov D1 %INPUTNUM
goto @checkturn2


[@checkturn2]
#IF
Equal D1 ""
#SAY
You have to write the amount.\
<Turn in (Rust) items/@@turn2>\

<Exit/@exit>\
#ELSEACT
goto @nextturn2


[@nextturn2]
#IF
checkitem SoulRulerRing(Rust) %D1
#ACT
Mov P2 %D1
Mov P3 300
Mul P2 P3
Mov D3 %P9
take SoulRulerRing(Rust) %D1
goto @givefp
#ELSESAY
You do not have this amount.\
<Exit/@exit>\

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;ANTIQ ITEMS                                            
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[@@turn3]
#ACT
Mov D1 %INPUTNUM
goto @checkturn3


[@checkturn3]
#IF
Equal D1 ""
#SAY
You have to write the amount.\
<Turn in (Antiq) items/@@turn3>\

<Exit/@exit>\
#ELSEACT
goto @nextturn3


[@nextturn3]
#IF
checkitem SoulRulerRing(Antiq) %D1
#ACT
Mov P2 %D1
Mov P3 300
Mul P2 P3
Mov D3 %P9
take SoulRulerRing(Antiq) %D1
goto @givefp
#ELSESAY
You do not have this amount.\
<Exit/@exit>\



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;GIVE FP                                          
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



[@givefp]
#IF
Checkfame
#ACT
Mov D4 %P9
Inc D4 %D3
Setfame %D4
Sysmsg "You get <$OUTPUT(D4)> FP"
 
  • Like
Reactions: Serane
Upvote 0

dagras

LOMCN Veteran
Veteran
Feb 6, 2011
282
3
44
awesome job once again yolom tyvm

now if i wanted script to check for more than 1 type of old, eg soulrulerring(old) and demontemptation(old) and soulpurifier(old) and say i have different numbers of each..
all i would need to do is put in

[@nextturn1]
#IF
checkitem SoulRulerRing(Old) %D1
checkitem demontemptation(old) %D1
ckeckitem soulpurifier(old) % D1



AND SHOULD WORK?
 
Upvote 0

Yolom

LOMCN Veteran
Veteran
Aug 7, 2010
325
21
45
Spain
Enjoy your script, I hope I have deserved reputation.

Code:
[@main]
#IF
#SAY
Choose which type of object you want to turn in and write his name.\
{FCOLOR/2}Object name must be written without (Old), (Rust) or (Antiq){FCOLOR/12}\
<Turn in (Old) items/@@turn(Old,300)>\
<Turn in (Rust) items/@@turn(Rust,600)>\
<Turn in (Antiq) items/@@turn(Antiq,900)>\
<Exit/@exit>\


[@@turn()]
#ACT
Mov A1 %INPUTSTR
Mov A2 %ARG(1)
Mov D1 %ARG(2)
Addstr A1 "("
Addstr A1 %A2
Addstr A1 ")"
#SAY
You want turn in: <$OUTPUT(A1)>\
<Type amount/@@Amount>\
<Exit/@exit>\


[@@Amount]
#ACT
Mov D2 %INPUTNUM
goto @checkamount


[@checkamount]
#IF
Equal D2 ""
#SAY
You can not leave the field empty, please enter the amount.\
<Type amount/@@Amount1>\
<Exit/@exit>\
#ELSESAY
You want turn in: <$OUTPUT(A1)>\
Amount: <$OUTPUT(D2)>\
<Yes/@yes>\
<Exit/@exit>\


[@yes]
#IF
checkitem %A1 %D2
#ACT
Mov P2 %D2
Mov P3 %D1
Mul P2 P3
Mov D3 %P9
take %A1 %D1
goto @givefp
#ELSESAY
You've indicated the following:
You want turn in: <$OUTPUT(A1)>\
Amount: <$OUTPUT(D2)>\
 But you do not have the object or the amount. Now you can:\
<Re-write amount/@@Amount>\
<Go back to choose Object and re-write his name/@main>\
<Exit/@exit>\


[@givefp]
#IF
Checkfame
#ACT
Mov D4 %P9
Inc D4 %D3
Setfame %D4
Sysmsg "You get <$OUTPUT(D3)> FP"
close

Regards,
 
Last edited:
  • Like
Reactions: dagras
Upvote 0

Zordon

Golden Oldie
Golden Oldie
Apr 26, 2008
1,176
20
145
Manchester, UK
heres one I did, its not just for olds/rusts either. You can also use it for exchanging booty for fame if you want.
 

Attachments

  • FPExchange-0.txt
    4.6 KB · Views: 26
  • Like
Reactions: dagras
Upvote 0