function onStepIn(cid, item, topos, frompos)
if getPlayerPremiumDays(cid) == 0 then
local n = {x=topos.x+3, y=topos.z, z=topos.z}
doRelocate(topos, n)
doSendMagicEffect(n, 12)
end
return true
end
function onAddItem(item, tile, position)
local n = position n.x = n.x + 3
return doRelocate(position, n), doSendMagicEffect(n, 12)
end
<moveevent event="stepin" actionid="200" script="premium_bridge.lua"/>
<moveevent event="AddItem" tileitem="1" actionid="200" script="premium_bridge.lua" />
function onStepIn(cid, item, pos)
if isPremium(cid) == false then
pos.x = pos.x + 3
doTeleportThing(cid, pos)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
end
return true
end
Last time I checked Avestas lua-functions (unedited by someone like yourself) only returns integers. So, isPremium(cid) == true should then be isPremium(cid) == 1 to work as expectedLua:function onStepIn(cid, item, pos) if isPremium(cid) == false then pos.x = pos.x + 3 doTeleportThing(cid, pos) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end return true end
function onStepIn(cid, item, topos, x:32061,y:32192 z:7)
local n = topos.x + 3
return getPlayerPremiumDays(cid) == 0 and doRelocate(topos, n), doSendMagicEffect(n, 12)
end
function onAddItem(item, tile, x:32061,y:32192 z:7)
local n = position.x + 3
return doRelocate(position, n), doSendMagicEffect(n, 12)
end
Are you sure your local n is sufficient for a position?-.^ I am too blind to see what it is. Use this then, easier to understand as well:
Lua:function onStepIn(cid, item, topos, frompos) if getPlayerPremiumDays(cid) == 0 then local n = topos.x + 3 doRelocate(topos, n) doSendMagicEffect(n, 12) end return true end
local n = {x = topos.x + 3, y = topos.y, z = topos.z}
function onStepIn(cid, item, topos, frompos)
if getPlayerPremiumDays(cid) == 0 then
local n = {x = topos.x + 3, y = topos.y, z = topos.z}
doRelocate(topos, n)
doSendMagicEffect(n, 12)
end
return true
end
function onAddItem(item, tile, position)
local n = position.x + 3
return doRelocate(position, n), doSendMagicEffect(n, 12)
end
function onStepIn(cid, item, position, fromPosition)
if getPlayerPremiumDays(cid) == 0 then
local n = {x = position.x + 3, y = position.y, z = position.z}
doRelocate(position, n)
doSendMagicEffect(n, 12)
end
return true
end
function onAddItem(item, tile, position)
local n = position.x + 3
return doRelocate(position, n), doSendMagicEffect(n, 12)
end
[/LIST]
Do you have the source files?Don't work :/
Is it possible to have another name of "Premium status" in the server? Idk why do not work