Ot?? mam problem z Tym skryptem:
W silniku wywala mi taki b??d :
Pomo?e mi kto? ???
Code:
-- by Piotr00
-- mozesz kopiowac ten skrypt jesli skopiujesz tez stopke
function odleglosc(pos1,pos2)
local ile = {0,0}
if (pos1.x >= pos2.x) then
local ile = {(pos1.x - pos2.x),0}
else
local ile = {(pos2.x - pos1.x),0}
end
if (pos1.y >= pos2.y) then
local ile = {ile[1],(pos1.y - pos2.y)}
else
local ile = {ile[1],(pos2.y - pos1.y)}
end
if ((ile[1] + ile[2]) <= 90) then
return true
else
return false
end
end
-- CONFIG
local lev = 80
-- END
function onSay(cid, words, param)
local player = getPlayerByName(param)
local playerpos = getPlayerPosition(cid)
local player2pos = getPlayerPosition(player)
local maxmana = getPlayerMaxMana(cid)
if isPremium(cid) == TRUE then
if (getPlayerLevel(cid) >= lev or getPlayerAccess(cid) >= 3) then
if (getPlayerMana(cid) == maxmana) then
if (isPlayer(player) == 1) then
if((getTilePzInfo(player2pos) == FALSE and getCreatureCondition(cid,CONDITION_INFIGHT) == FALSE)) then
if (odleglosc(playerpos,player2pos) == true) then
doTeleportThing(cid,getPlayerPosition(player))
doPlayerSendTextMessage(cid, 19,"Teleportowales sie do \""..param.."\" poprawnie. Straciles "..maxmana.." many.")
doPlayerAddMana(cid,-maxmana)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Jestescie za daleko od siebie")
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nie mozesz byc w walce, gracz nie moze byc w pz.")
end
else
doPlayerSendCancel(cid,"Nie odnaleziono gracza.")
end
else
doPlayerSendCancel(cid,"Nie masz pelnej many.")
end
else
doPlayerSendCancel(cid,"Musisz miec powyzej '.. lev ..' lvl")
end
end
return true
end
Code:
[Error - TalkAction interface ]
data/talkactions/scripts/tp.lua:onSay
Description:
<luaGetThingPosition> Thing not found