Forum

> > CS2D > Scripts > With NPC
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch With NPC

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt With NPC

BrownSoldier
BANNED Off Offline

Zitieren
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

alt Re: With NPC

robed
User Off Offline

Zitieren
rpg tibia?

copy and paste the lua script in rpg tibia

alt Re: With NPC

J4x
User Off Offline

Zitieren
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

alt Re: With NPC

BrownSoldier
BANNED Off Offline

Zitieren
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

alt Re: With NPC

J4x
User Off Offline

Zitieren
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.

alt Re: With NPC

TimeQuesT
User Off Offline

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

1
parse (string.format("spawnnpc %s %s %s %s",type,x,y,rot));
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht