• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua TFS 0.3.6pl1 - doTeleportThing - Do not work.

zajacmp3

New Member
Joined
Jan 5, 2009
Messages
35
Reaction score
0
Location
Poland, Gdansk
Hello!

I want to introduce you a part of my test NPC script. On what I am testing some functions. I noticed that doTeleportThing does not work. I think the issue is in how I am writing position. Any ideas what I am doing wrong?


PHP:
function onCreatureSay(cid, type, msg)
local pos = {x=1050, y=1048, z=6, stackpos=1}
	msg = string.lower(msg)

	if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 and getPlayerStorageValue(cid, 66666) == 5 then
		selfSay('Eureka.')
		doTeleportThing(cid, pos)
		focus = 0

	elseif (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
		selfSay('Jestes wtrakcie walki.')
		focus = 0
	elseif (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 and (getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE) then
		selfSay('Nie walczysz')
		focus = 0
		setPlayerStorageValue(cid, 66666, 5)
	end
end
 
Back
Top