• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Need Help for Npc , Faq or guide pls

Newbie Spellweaver
Joined
Sep 23, 2006
Messages
34
Reaction score
1
Hello to all, I need a guide for creates npc. Something of programming, but even so single to be created npc but easy.

Aver if somebody knows some guide or something, estaria very thanked for who puesiese a Link or some to me faq, to be able to study a little to me the subject. Salu2 to all and thank you very much.

Srry me bad inglish , im use traductor , im spanish. thx 4 all.

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

Hola a todos, necesito una guia para crea npc. Se algo de programaci
 
Newbie Spellweaver
Joined
Feb 19, 2003
Messages
62
Reaction score
0
Here is an old guide to NPC commands. I'm sure there are some new commands out now but I dont have them.

I've also included a quest NPC that will give you an idea of how it all works.

Example of Quest NPC -

[@main]
Welcome <$PLAYERNAME>\
Are you feeling lucky today?\
If you are I can give you an opportunity\
to gain much experience and some very sought\
after items in the Lair of the White Worm!\
<Tell me more/@main_1>\
<No thanks/@exit>

[@main_1]
Well <$PLAYERNAME>, the Lair of the White Worm\
is a hideous place but the rewards are great!\\
Of course not just anyone can go to the Lair.\
In order to qualify you must survive in another\
dungeon for 3 minutes, if you do I will teleport\
you to the lair of the White Worm.\
<Let's do it!/@main_2>\
<No thanks/@exit>

[@main_2]
Very well <$USERNAME>,\

Prepare to meet thy fate.\

Remember, if you teleport out of the first dungeon\
you will not go to the Lair of the White Worms!\

<Do you still wish to continue?/@yes_1>\
<Hmmm... no thanks/@exit>\
<>

[@yes_1]
#IF
checklevel 34
#ACT
goto @main1
#ELSESAY
You are not high enough level to go here!\
<Exit/@exit>\

[@main1]
#SAY
Hopefully I'll see you again soon!
#ACT
;mapmove 0 327 268
;timerecall (D8203)
batchDelay 1
addbatch custom2
batchdelay 180
addbatch custom1
batchmove

;By Hawky






NPC COMMANDS AND SYNTAX



set [x] 1/0

eg
set [30] 1


this will set the variable number with either a 1 or a 0




check [x] 1/0

eg
#IF
check [30] 1
#ACT
goto @talk


this will check the character variable number 30, if it is 1, then it will goto the sub named @talk




goto <sub procedure>


eg
goto @nextone


this will move the script on to the specified sub procedure




checkjob warrior/taoist/wizard

eg
#IF
checkjob warrior
#ACT
goto @hesawarrior


this checks the current characters job




checklevel x

eg
#IF
checklevel 30
#ACT
goto @heslevel30


this checks the current characters level





checkitem <item> <ammount>

eg
#IF
checkitem GoldBar 1
#ACT
goto @gotgoldbar


this will check if the user has got the specified ammount of the speicifed item




checkgold <ammount>

eg
#IF
checkgold 1000
#ACT
goto @gotthegold




this will check if the user has got the specified ammount of gold or not





give <item> <ammount>

eg
give GoldBar 3


this will give the user the specified ammount of the specified item




take <item> <ammount>

eg
take GoldBar 3


this will take away from the user the specified ammount of the specified item




map <map id>

eg
map B101




this will move the user to the specified map at a random coord







mapmove <map id> <x coord> <y coord>

eg
map 0 300 300




this will move the user to the speicifed map and coords




Param1 <map name>
Param2 <target x loc>
Param3 <target y loc>
MonGen <mob name> <ammount> <?>



eg
Param1 0102
Param2 7
Param3 7
MonGen Woomataurus 1 1


this will spawn the specified number of the specified mob on the specified map, at the specified loc(random?)




monclear <map name>


eg
monclear 0102


this will clear all the MOBS from the specified map, all NPCs will remain





daytime <time of day>


eg
#IF
daytime day
#SAY
Its daytime!


this will check what time it is, choices are day/night/sunraise/sunset




random <number>


eg
#IF
random 10
#SAY
A one out of ten chance, and you got it!
#ELSESAY
Rofl, joo sook


this will give the user a 1/x chance for the script to move on to the next command, x being the number entered




timerecall <time in minutes>


eg
#IF
checklevel 30
#SAY
In you go, ill fetch you out after five minutes!
#ACT
map g004 5 5
timerecall 5


this will recall the user from the map he was sent from in the specified number of minutes




breaktimerecall


eg
breaktimerecall


this will stop all timerecall timers for this character




checkbaggage


eg
#IF
checkbaggage
#SAY
you have room, here you go!
#ACT
give Woomahorn
#ELSESAY
you have no room! heres some gold instead.
#ELSEACT
give gold 1000000


this will check to see if you have room in your bag or not for an item




movr <variable name> <number>


eg
#ACT
movr d0 6
inc d0 1
#SAY
you have rolled the number <$STR(D0)>!


this will roll a number between 0 and the specified number, and store it in the specified variable
to access the stored number, look up <$STR(x)> below




inc <variable> <number>


eg
#ACT
movr d0 6
inc d0 1


this will increase the specified variable by the specified ammount




equal <variable> <number>


eg
#ACT
movr d0 6
inc d0 1
#IF
equal d0 1
#SAY
you rolled a one!


this will check to see if the variable specified is the number specified or not




playdice <number of dice> <target sub>


eg
[@main]
<Roll the dice!/@roll>

[@roll]
#ACT
movr d0 6
inc d0 1
playdice 1 @cube

[@cube]
#SAY
You rolled a <$STR(D0)>!


this will show the specified number of dice rolling(values stored in d0-9), after they have stopped rolling
they will move onto the specified sub-procedure



batchDelay <time in seconds>
addbatch <map name>
batchmove


eg
batchDelay 1
addbatch 0101
addbatch 0102
addbatch 0103
addbatch 0104
batchmove


this will move the player through each of the specified maps, at an interval of the specified seconds.




checkhum <map> <number>


eg
#IF
checkhum 0101 5
#SAY
Im afraid there are already two people in the room, come back later!
#ELSESAY
In you go!
#ELSEACT
map 0101




close


eg
close


this will close the current dialog box that is open


break


eg
break


this will stop the script. ie, it will not continue with the next #IF #ACT functions.

Example scripts using #SAY


[@main]
#IF
checkgold 3000
#SAY
You have 3000 gold, do you want to buy my uberthing?
<Yes/@buyit>
<No/@nothanks>


[@buyit]
#IF
checkgold 3000
#ACT
take gl 3000
give uberthing 1
#SAY
Heres your uberthing!
<Close/@exit>


[@nothanks]
#ACT
give notsouberthing 1
#SAY
Fine
heres a notsouberthing, on the house
Enjoy!


gender <gender>
Check if the character is male or female
For use with gender specific items (armour)

#IF
gender man
#SAY
You are male
#ELSESAY
You are female
(There is no Gender woman, for woman use #elseact )

DAYOFWEEK <3 letter day> ( MON TUE WED THU FRI SAT SUN )

eg
#if
DAYOFWEEK MON
#say
it is monday
#elsesay
It is not monday


Script Identifiers:

<$USERNAME> = current character name
<$USERWEAPON> = current characters weapon
<$STR(x)> = returns the value of the variable x
<$CASTLEWARDATE> = returns the date of the next subak war
<$LISTOFWAR> = lists all the upcomming subak wars

checkitemw <item>

Check's that the item is being worn by player.

takew <item>

Takes item being worn


Hope this helps :)
 
Newbie Spellweaver
Joined
Sep 23, 2006
Messages
34
Reaction score
1
Many thank you very much by your aid, that manual to served to me very useful, already I can begin to do some npcs that tapeworm in mind. Salu2 I thanks for all friend.


Very luck 4 u.
 
Back
Top