Forum

> > CS2D > Scripts > With NPC
Forums overviewCS2D overview Scripts overviewLog in to reply

English With NPC

6 replies
To the start Previous 1 Next To the start

old With NPC

BrownSoldier
BANNED Off Offline

Quote
Im wana ask one question
How to add a npc in position : X819 Y243
And when u say hi to him he answers :
Hello

Please tell me how

old Re: With NPC

robed
User Off Offline

Quote
rpg tibia?

copy and paste the lua script in rpg tibia

old Re: With NPC

J4x
User Off Offline

Quote
use the
1
spawnnpc type x,y,rot
command.

for the hi thing:
1
2
3
4
5
6
7
8
addhook("say","hiwithme")
function hiwithme(id,txt)
	if object(1,"exists") or object(2,"exists") or object(3,"exists") or object(4,"exists") or object(5,"exists") then
	if (txt=="hello") then
	msg2(id,"npc:Hi")
end
end
end

old Re: With NPC

BrownSoldier
BANNED Off Offline

Quote
Its not for rpg tibia...
Its for gangster wars
and FN

Im used

spawnnpc 2826,2429,rot 90



addhook("say","hiwithme")
function hiwithme(id,txt)
if object(1,"exists") or object(2,"exists") or object(3,"exists") or object(4,"exists") or object(5,"exists") then
if (txt=="hello") then
msg2(id,"npc:Hi")
end
end
end

Dont work
dont see any npc

old Re: With NPC

J4x
User Off Offline

Quote
this will not make npc appears this will make that when you say hi the npc will talk to you, to make it appear wirte in the console: spawnnpc TYPE 2826,2429,rot 90.

>replace type with a number from 1 to 5.

old Re: With NPC

TimeQuesT
User Off Offline

Quote
you must parse it as server with the "parse" function:
example:

1
parse (string.format("spawnnpc %s %s %s %s",type,x,y,rot));
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview