Stecush123
New Member
Witam, po raz kolejny ja. Jak zrobić teleport, po którym (po deadzie) logujemy się np. w Carlin? A np. przejde przez inny i po deadzie będę w Thais. Ogarniacie?D:
function onUse(cid, item, frompos, item2, topos)
tile_x = 757
tile_y = 290 ------------- To gdzie stoi statuetka
tile_z = 9
cTem_x = 751
cTem_y = 297 ---------- Tu gdzie masz sie pojawiac po dedzie
cTem_z = 9
msg = "Zostales obywatelem miasta x!"
templeP = {x=cTem_x, y=cTem_y, z=cTem_z}
tileP = {x=tile_x, y=tile_y, z=tile_z}
pPos = getPlayerPosition(cid)
check = checkPos(tileP, pPos)
if check == 1 then
doPlayerSetTown(cid,10)
checkSw(item)
doTeleportThing(cid, templeP)
doSendMagicEffect(templeP, 10)
doPlayerSendTextMessage(cid, 20, msg)
else
doPlayerSendCancel(cid, "Ustan naprzeciwko Statuetki!")
end
return 1
end
function checkPos(tileP, pPos)
if tileP.x == pPos.x and tileP.y == pPos.y then
return 1
else
return 0
end
end
function checkSw(item)
if item.itemid == 2711 then
doTransformItem(item.uid, 2712)
elseif item.itemid == 2712 then
doTransformItem(item.uid, 2711)
end
end
<action uniqueid="14000" script="miasto1.lua" />
function onStepIn(cid, item, pos)
if item.actionid == 3021 then
doPlayerSendTextMessage(cid,22, "Ale z ciebie wariat.")
doPlayerSetTown(cid,1)
elseif item.actionid == 3022 then
doPlayerSendTextMessage(cid,22, "Ale z ciebie wariat.")
doPlayerSetTown(cid,22)
end
return 1
end
To jest kozackie;DAle z ciebie wariat.
return 1
end
function checkPos(tileP, pPos)
if tileP.x == pPos.x and tileP.y == pPos.y then
return 1
else
return 0
end
end
function checkSw(item)
if item.itemid == 2711 then
doTransformItem(item.uid, 2712)
elseif item.itemid == 2712 then
doTransformItem(item.uid, 2711)
end
end