Help With NPC ><

Join Discord

Tahriel

LOMCN Veteran
Veteran
Jun 1, 2004
319
0
63
creating an npc where you need an item and 500000 gold to "upgrade* armour (not really an upgrade just swaps for a berret verdion of it)

tried scripting it but failed sumwhere :S ne1 help?



[@main]
Hello there Traveller. I have the ability to upgrade\
Your Armour. I am sorry but my skills are very limited\
so i can only upgrade BlueArmour at the moment.\
To upgrade BlueArmour i will need two things:\
1) <5 Million Gold/@infogold>\
2) <StatusScroll/@infostatscrl>\\
<More.../@more>

[@infogold]
#SAY
The For the materials for the upgrade i need\
5 million Gold from you. It may take you long it\
may not take you long. Either way you better\
start saving for this AMAZING upgrade\\
<Ok/@main>

[@infostatscrl]
#SAY
This is a special scroll dropped by only a few mobs\
There is a higher chance of getting the scroll from\
boss mobs than there is of getting one from a normal\
mob. You better get hunting if you want to find this\
scoll\\
<Ok/@main>

[@more]
#SAY
Ahhh <$USERNAME> Welcome. I guess you bring with you\
the two things i need to upgrade your BlueArmour???\
<Yes/@check> <Not Yet/@main>

[@check]
#IF
check gold 5000000
check StatusScroll 1
#ACT
goto @proceed
#ELSEACT
goto @stop

[@proceed]
#SAY
Ok for the next part i need you to take your\
BlueArmour and put it in your bag. You cannot\
proceed unless it is, and also please state your\
Gender\\
<Male/@check1> <Female/@check2>
<Forget It/@exit>

[@stop]
#SAY
Sorry, you lack one of the two things i need\
for the process to proceed. Check that you have\
StatusScroll and 5 million gold in you bag.\\
<Ooops/@main>

[@check1]
#IF
check BlueArmour(M) 1
check gold 5000000
check StatusScroll 1
#ACT
take BlueArmour(M) 1
take StatusScroll
take gold 5000000
goto @recieveM
#ELSEACT
goto @norecieveM

[@recieveM]
#ACT
give BlueArmour+(M) 1
#SAY
There is your upgraded armour!!!\
I hope you enjoy it. Make it last\\
<Thanks Alot!/@exit>

[@norecieveM]
#SAY
Sorry you lack one or more of the items\
needed for the upgrade. Please collect them\
and come back later.\\
<Ok Sorry/@exit>

[@check2]
#IF
check BlueArmour(F) 1
check gold 5000000
check StatusScroll 1
#ACT
take BlueArmour(F) 1
take StatusScroll 1
take gold 5000000
goto @recieveF
#ELSEACT
goto @norecieveF

[@recieveF]
#ACT
give BlueArmour+(F) 1
#SAY
There is your upgraded armour!!!\
I hope you enjoy it. Make it last\\
<Thanks Alot!/@exit>

[@norecieveF]
#SAY
Sorry you lack one or more of the items\
needed for the upgrade. Please collect them\
and come back later.\\
<Ok Sorry/@exit>
 

Lilcooldoode

LOMCN Developer
Developer
May 10, 2003
2,236
760
360
Yes
Ok well 2 things come straight to mind...

Change "check" to "checkitem" and change "check gold" to "checkgold".... I havent read ful NPC but if that doesnt work lemme know.
 
Last edited:

Tahriel

LOMCN Veteran
Veteran
Jun 1, 2004
319
0
63
kk thanks :D now the problem lies in this part.......
he dosent give or take the items listed


[@check1]
#IF
checkitem BlueArmour(M) 1
checkgold 5000000
checkitem StatusScroll 1
#ACT
takeitem BlueArmour(M) 1
takeitem StatusScroll
takegold 5000000
goto @recieveM
#ELSEACT
goto @norecieveM

[@recieveM]
#ACT
giveitem BlueArmour+(M) 1
#SAY
There is your upgraded armour!!!\
I hope you enjoy it. Make it last\\
<Thanks Alot!/@exit>

[@norecieveM]
#SAY
Sorry you lack one or more of the items\
needed for the upgrade. Please collect them\
and come back later.\\
<Ok Sorry/@exit>

[@check2]
#IF
checkitem BlueArmour(F) 1
checkgold 5000000
checkitem StatusScroll 1
#ACT
takeitem BlueArmour(F) 1
takeitem StatusScroll 1
takegold 5000000
goto @recieveF
#ELSEACT
goto @norecieveF

[@recieveF]
#ACT
giveitem BlueArmour+(F) 1
#SAY
There is your upgraded armour!!!\
I hope you enjoy it. Make it last\\
<Thanks Alot!/@exit>

[@norecieveF]
#SAY
Sorry you lack one or more of the items\
needed for the upgrade. Please collect them\
and come back later.\\
<Ok Sorry/@exit>
 

Lilcooldoode

LOMCN Developer
Developer
May 10, 2003
2,236
760
360
Yes
ok there change "takegold" to "take gold", change "takeitem" to "take, and change "giveitem" to "give"....