NPC Script.

IceSlice

Golden Oldie
Golden Oldie
May 24, 2005
1,320
207
250
Habs head rent free
Code:
[@main]
Hello im the GenderChanger How may i help you today..?\
<I would like to change Genders\@gen>\
<Nevermind wrong person.\@exit>
 
[@gen]
Ok So what may i change you into my troubled son...?
<Female Please\@fem>
<Male Please\@male>
 
[@fem]
#IF
CHECKGENDER male
#ACT
CHANGEGENDER female
#SAY
There you go you are now Female.
break
#ELSESAY
Sorry, your already Female.
 
[@male]
#IF
CHECKGENDER female
#ACT
CHANGEGENDER male
#SAY
There you go you are now Male.
break
#ELSESAY
Sorry, your already male.

Ok just 1 i made up as i made the post. tell me owt thats wrong, and the check gender changegender im not too sure about but please correct me. never done this type of npc before.
 

boothy

LOMCN Veteran
Veteran
Mar 23, 2007
458
12
45
[@main]
Hello im the GenderChanger How may i help you today..?\
<I would like to change Genders\@gen>\
<Nevermind wrong person.\@exit>

[@gen]
Ok So what may i change you into my troubled son...?
<Female Please\@fem>
<Male Please\@male>

[@fem]
#IF
GENDER MAN
#ACT
CHANGEGENDER 1
#SAY
There you go you are now Female.
break
#ELSESAY
Sorry, your already Female.

[@male]
#IF
GENDER WOMAN
#ACT
CHANGEGENDER 0
#SAY
There you go you are now Male.
break
#ELSESAY
Sorry, your already male.


That should work i think lol
 

IceSlice

Golden Oldie
Golden Oldie
May 24, 2005
1,320
207
250
Habs head rent free
[@main]
Hello <$USERNAME> i'm the PetRenter of <$SERVERNAME>\
How may i help you today..?\ \
<I would like to buy some pets please.\@pet>
<Nevermind was just checking you out.\@exit>

[@pet]
Ok i can only give you certain pets for a certain level so\
tell me what level region you are in and i will gladly help you.\ \
<1-12\@112>\
<13-19\@1319>\
<20-27\@2027>\
<28-36\@2836>\
<37-45\@3745>\
<46-49\@4649>\
<50-60\@5060>\
<Nevermind i'll go back\@back>\\

[@112]
Ok these are the pets you are able to have.\
<5 CaveBats\@cb>\
<5 CaveMaggots\@cm>\
<5 ForestYetis\@fy>\
<5 Omas\@o>\
<Nevermind i'll go back.\@back>\\

[@1319]
Ok these are the pets you are able to have.\
<5 OmaFighters\@of>\
<5 Skeletons\@s>\
<5 BoneFighters\@bf>\
<Nevermind i'll go back\@back>\\

[@2027]
Ok these are the pets you are able to have.\
<5 OmaWarriors\@ow>\
<5 BoneWarriors\@bw>\
<5 ToxicGhouls\@tg>\
<5 RhoninGhoul\@rg>\
<Nevermind i'll go back\@back>\\

[@2836]
Ok these are the pets you are able to have.\
<5 BugMaggots\@bm>\
<5 Centipedes\@c>\
<5 RedBoars\@rb>\
<5 BlackEvilBoars\@beb>\
<Never mind i'll go back\@back>\\

[@3745]
Ok these are the pets you are able to have.\
But at a price.\
<5 Minotaurs 100K\@m>\
<5 ZumaGuardians 100K\@zg>\
<5 BoneSpearmen 120K\@bs>\
<5 BoneBlademen 120K\@bb>\
<Nevermind i'll go back\@back>\\

[@4649]
Ok these are the pets you are able to have.\
But at a price.\
<5 Slaves 500K\@sl>\
<5 EvilTongs 500K\@et>\
<5 WhiteEvilBoars 500k\@web>\
<3 SmallBubbles 350k\@sb>
<Nevermind i'll go back\@back>\\

[@5060]
Ok these mobs you can have but at a reasonable\
Price.\
<2 WoomaTaurus' 1.2Mill\@wt>\
<3 EvilSnakes 1.2Mill\@es>\
<3 WizardFox 800k\@wf>\
<3 WarriorFox 800k\@waf>\
<3 TaoFox 800k\@tf>\
<Nevermind i'll go back\@back>\\


This is what iv done in about 10 mins, all i need to no is how the checklevel works... if i put it like this for cavebat 1-12.

[@cavebat]
#IF
checklevel 12
#SAY
i see your just about the right age. here you go then.\
#ACT
recallmob cavebat 0 5
break
#ELSESAY
you are too old to use these mobs check out the next\
ones on the list.\\

Ok that wouldnt work i no that but i want the script to check that the person clicking on the npc is 12 or below how would i go about that..?
 

IceSlice

Golden Oldie
Golden Oldie
May 24, 2005
1,320
207
250
Habs head rent free
eh..?

all i need is to see how to..

Set tags.
and make it so its 12 and below or 34 below etc.

[@slave]
#IF
checklevel < 12
checkgold 500000
#ACT
recallmob slave 0 5
take gold 500000
#ELSESAY
You are either too high to get these or you are too low.\\
#ELSEACT
@kill <$USERNAME>
goto @say

[@say]
Thats for trying to use my service without propper standards\\

----------------------

Would that work? :P
 

Holy

LOMCN Veteran
Veteran
Feb 13, 2006
372
0
42
eh..?

all i need is to see how to..

Set tags.
and make it so its 12 and below or 34 below etc.

[@slave]
#IF
checklevel < 12
checkgold 500000
#ACT
recallmob slave 0 5
take gold 500000
#ELSESAY
You are either too high to get these or you are too low.\\
#ELSEACT
@kill <$USERNAME>
goto @say

[@say]
Thats for trying to use my service without propper standards\\

----------------------

Would that work? :P

I dont generally code npcs with say / act scripts in same part as they get confusing...

[Echo Code]
[@Main]
#IF
CHECKLEVEL < 12
CHECKSLAVECOUNT < 1
CHECKGOLD 500000
#ACT
GOTO @HaveEverything
#ELSEACT
GOTO @NotGot
break

[@NotGot]
You either dont have enough gold, or you already have a better\
or you are to low a level to use my services.\ \

Exit/@exit

[@HaveEverything]
#ACT
Take gold 500000
RECALLMOB Slave 0 5
GOTO @Finish
break

[@Finish]
Enjoy your new helper!\ \

Exit/@exit