Solved NPC setup

Play Now
Status
Not open for further replies.

acer777

Banned
Banned
Veteran
Jul 28, 2010
299
1
45
lol been asking alot of question >.< but only way i will learn but now this is really gettin on my nerve's ive been trying to add in a new npc, ive put it in the npc.txt and also the script in the NPC_def folder name of the npc is TEST and the map is 0125 script name is TEST-0125. Thing that im getting stuck on is that every time i click on the npc the npc says NPC: error no castle found i have no idea as just started these files today help would be great thanks.
 

Breezer

Legend
Legendary
Jul 16, 2004
3,684
845
345
I generally stick to putting my npc's inside Merchant_def (Allows you to use short named text files and choice of npc name). Anyways could you post your script and what u put inside NPC.txt
 
Upvote 0

Tai

HEAD CAPTAIN
Staff member
Administrator
May 11, 2003
14,769
3
3,342
495
United Kingdom
Seeing as the npc shows up ingame, and displays an error when you click it, it's obviously a script error. Therefore we can't help you until you post the script.
 
Upvote 0

acer777

Banned
Banned
Veteran
Jul 28, 2010
299
1
45
[@main]
<click here/@c1>\ \ \
<Colour/FCOLOR=5>\ \
<Exit/@Exit>\

[@c1]
LINEMSG 0 "hello there <$USERNAME> from <$GUILDNAME>"
BREAK

basically just got the files and trying to see if the npc will talk like a player and actually say the users name and guild name etc. i think ill just move it to merchant npc as that seems easier idea but what does the ftile/btile actually do as i think im doing something wrong in there (npcs.txt) thanks
 
Upvote 0

Tai

HEAD CAPTAIN
Staff member
Administrator
May 11, 2003
14,769
3
3,342
495
United Kingdom
Don't forget your #SAY and #ACT statements for a start.

[@main]
#SAY
<click here/@c1>\ \ \
<Colour/FCOLOR=5>\ \
<Exit/@Exit>\

[@c1]
#IF
#ACT

LINEMSG 0 "hello there <$USERNAME> from <$GUILDNAME>"
BREAK
 
Upvote 0

acer777

Banned
Banned
Veteran
Jul 28, 2010
299
1
45
hmm could be ill test now but on ruby didnt need to use #SAY on @main but diff files so ill test now n post bak.

---------- Post added at 11:52 AM ---------- Previous post was at 11:49 AM ----------

Nope still does the same thing, im pretty sure its something to do with the f/btile thingy in npcs.txt what numbers should they be for a npc i wont to create got them set to 0 8 atm.

---------- Post added at 11:56 AM ---------- Previous post was at 11:52 AM ----------

moved it over to a merchant it will still act the same as a npc so hopefully will work. ye merchant worked so its alright now nvm
 
Upvote 0

acer777

Banned
Banned
Veteran
Jul 28, 2010
299
1
45
Scripting lil help

Does heroes files support names and guild names in SEND/LINEMSG?
example:
SENDMSG 4 "hello there <$USERNAME> from <$GUILDNAME>"

this doesnt work and they are TD's 2.3 commands but is there a heroes command to do the same job? basicall were says <$USERNAME want it to say the characters name and guildname well there guild there in names.
 
Upvote 0

iJam

To the rhythm
VIP
Oct 8, 2007
1,526
105
240
London
Re: Scripting lil help

try this

#ACT
SENDMSG 4 1 "hello there <$USERNAME> from<$GUILDNAME>."
 
Last edited:
Upvote 0

acer777

Banned
Banned
Veteran
Jul 28, 2010
299
1
45
Re: Scripting lil help

thats same and in my script i put #ACT just wanted to know if the commands <$USERNAME>/guild name 1 works like TD's or if there is another command that does the same job etc. lmao im a fail again >.< forgot i didnt make a guild so the npc was saying some wired stuff my bad arrggg sorry lol and yes there the same as TD's command so that nice.
 
Upvote 0

iJam

To the rhythm
VIP
Oct 8, 2007
1,526
105
240
London
Re: Scripting lil help

you didn't put the '1' in yours, and yeah they work like 2.3

#IF and #ACT commands for heroes here

i did have a list of other ones like <$USERNAME> can't find them at mo
il have look on hd and post if i find.
 
Last edited:
Upvote 0
Status
Not open for further replies.