Advanced FamePoint Exchange NPC

TheDayIDie

Banned
Banned
Dedicated Member
Jul 29, 2011
4,071
97
135
UK
Not seen this on any other server before.
This npc is your average fame point NPC but it's been scripted so you can type how many of the fameplates you wish to exchange for fame or how much fame you wish to exchange to plates. Saves players from doing alot of clicking

Code:
[@main]
#IF
CHECKFAME
#ACT
Mov D9 %P9
SETFAME %D9
#SAY
Hello {FCOLOR/1}<$username>{FCOLOR/12},\
You have {FCOLOR/10}<$OUTPUT(D9)>{FCOLOR/12} fame.\\
FamePlates to FamePoints\
<FamePlate(50)/@exchange(fameplate(50),50)>\
<FamePlate(100)/@exchange(fameplate(100),100)>\
<FamePlate(200)/@exchange(fameplate(200),200)>\
<FamePlate(500)/@exchange(fameplate(500),500)>\
<FamePlate(1000)/@exchange(fameplate(1K),1000)>\
<FamePlate(5000)/@exchange(fameplate(5K),5000)>\
<FamePlate(10000)/@exchange(fameplate(10K),10000)>\\
FamePoints to FamePlate\
<FamePlate(50)/@exchange1(fameplate(50),50)>\
<FamePlate(100)/@exchange1(fameplate(100),100)>\
<FamePlate(200)/@exchange1(fameplate(200),200)>\
<FamePlate(500)/@exchange1(fameplate(500),500)>\
<FamePlate(1000)/@exchange1(fameplate(1K),1000)>\
<FamePlate(5000)/@exchange1(fameplate(5K),5000)>\
<FamePlate(10000)/@exchange1(fameplate(10K),10000)>\\




[@exchange1()]
#ACT
mov A1 %ARG(1)
mov D1 %ARG(2)
goto @choose1

[@choose1]
#IF
#ACT
mov D2 "1"
goto @type1

[@type1]
#SAY
<Enter Amount/@@typeamount1>\
Do you wish to create {FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12} x {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12} ?\\
<Yes, continue/@continue1>\
<No, Reset/@choose1>\

[@@typeamount1]
#ACT
mov D2 %Inputstr
goto @type1                   ; D2 = TYPED          ; D1 = FAMEAMOUNT

[@continue1]
#IF
#ACT
MOV P2 %D1
MOV P3 %D2
MUL P2 P3
MOV D7 %P9
goto @next1

[@next1]
#IF
CHECKFAME %D7
#ACT
GIVE %A1 %D2
DEC D9 %D7
SETFAME %D9
SYSMSG "You have traded <$OUTPUT(D7)> fame points for <$OUTPUT(D2)> x <$OUTPUT(A1)>"
break
#ELSEACT
SYSMSG "You do not have <$OUTPUT(D7)> fame points"
break

[@exchange()]
#ACT
mov A1 %ARG(1)
mov D1 %ARG(2)
goto @choose

[@choose]
#IF
#ACT
mov D2 "1"
goto @type

[@type]
#SAY
<Enter Amount/@@typeamount>\
Do you wish to exchange {FCOLOR/10}<$OUTPUT(A1)>{FCOLOR/12} x {FCOLOR/10}<$OUTPUT(D2)>{FCOLOR/12}?\\
<Yes, continue/@continue>\
<No, Reset/@choose>\

[@@typeamount]
#ACT
mov D2 %Inputstr
goto @type                     ; D2 = TYPED          ; D1 = FAMEAMOUNT

[@continue]
#IF
#ACT
MOV P2 %D1
MOV P3 %D2
MUL P2 P3
MOV D7 %P9
goto @next

[@next]
#IF
CHECKITEM %A1 %D2
#ACT
TAKE %A1 %D2
INC D9 %D7
SETFAME %D9
SYSMSG "You have traded <$OUTPUT(D2)> x <$OUTPUT(A1)> for <$OUTPUT(D7)> fame points"
break
#ELSEACT
SYSMSG "You do not have <$OUTPUT(D2)> x <$OUTPUT(A1)>"
break
 

TheDayIDie

Banned
Banned
Dedicated Member
Jul 29, 2011
4,071
97
135
UK
thanks, made that last week and wasn't planning on releasing but it's no good rotting away in my mud3 waiting to be deleted lol ^^
Thought I'd share it to the community, enjoy ;)
 
Upvote 0