bylundjonas
"Tibia Mapper"
need script pay for door
function onUse(cid, item, fromPosition, itemEx, toPosition)
local money = 4000000 -- how much money you need.
local pos = {X = xxx, Y = yyy, Z = z} -- were to be teleported.
if getPlayerMoney == money then
doPlayerRemoveMoney(cid, money)
doTeleportThing(cid, pos)
else
doPlayerSendTextMessage(cid,22,'You need 400cc to enter here.')
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local money = 4000000 -- how much money you need.
local pos = {X = xxx, Y = yyy, Z = z} -- where to be teleported.
if getPlayerMoney >= money then
doPlayerRemoveMoney(cid, money)
doTeleportThing(cid, pos)
else
doPlayerSendTextMessage(cid,22,'You need " .. money .. " gold coins to enter here.')
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)how i add on this script a min level ??
function onUse(cid, item, fromPosition, itemEx, toPosition)
local money = 4000000 -- how much money you need.
local pos = {X = xxx, Y = yyy, Z = z} -- where to be teleported.
local level == 1000
if getPlayerMoney >= money and getPlayerLevel(cid) >= level then
doPlayerRemoveMoney(cid, money) doTeleportThing(cid, pos)
elseif getPlayerLevel(cid) <= level then
doPlayerSendTextMessage(cid,22,'You are to low level for this.')
else doPlayerSendTextMessage(cid,22,'You need " .. money .. " gold coins to enter here.') end
end
return true
end
local money = 4000000 -- how much money you need.
local pos = {X = xxx, Y = yyy, Z = z} -- where to be teleported.
local level = 1000
local c = {
con = function(id) return getPlayerLevel(id) >= level, getPlayerMoney(id) >= money end,
msg = {'You are to low level for this.', 'You need ' .. money .. ' gold coins to enter here.', 'off we go!'},
i = 1
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local condition, x = {c.con(cid)}, c.i
if condition[1] then
x = 2
if condition[2] then
x = 3
doPlayerRemoveMoney(cid, money)
doTeleportThing(cid, pos)
end
end
doPlayerSendTextMessage(cid,22, c.msg[x])
return true
end
wow wth? why you made the code ugly :S ?Code:local money = 4000000 -- how much money you need. local pos = {X = xxx, Y = yyy, Z = z} -- where to be teleported. local level = 1000 local c = { con = function(id) return getPlayerLevel(id) >= level, getPlayerMoney(id) >= money end, msg = {'You are to low level for this.', 'You need ' .. money .. ' gold coins to enter here.', 'off we go!'}, i = 1 } function onUse(cid, item, fromPosition, itemEx, toPosition) local condition, x = {c.con(cid)}, c.i if condition[1] then x = 2 if condition[2] then x = 3 doPlayerRemoveMoney(cid, money) doTeleportThing(cid, pos) end end doPlayerSendTextMessage(cid,22, c.msg[x]) return true end
Its different not uglywow wth? why you made the code ugly :S ?
i like it, diff way same shitwow wth? why you made the code ugly :S ?
A little more information would be helpful, like what did you edit/add to the script?thanks very much for your consideration/support.
but, I had problems with the 'teleportthing', I was not telep. to the position.
I wonder what would . You can help me ?
tks
A little more information would be helpful, like what did you edit/add to the script?
Post the script for christ sakes...are you people retarded?
sry.. here it's'
local money = 4000000 -- how much money you need.
local pos = {X = 160, Y = 60, Z = 7} -- where to be teleported.
local level = 1000
local c = {
con = function(id) return getPlayerLevel(id) >= level, getPlayerMoney(id) >= money end,
msg = {'You are to low level for this.', 'You need ' .. money .. ' gold coins to enter here.', 'off we go!'},
i = 1
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local condition, x = {c.con(cid)}, c.i
if condition[1] then
x = 2
if condition[2] then
x = 3
doPlayerRemoveMoney(cid, money)
doTeleportThing(cid, pos)
end
end
doPlayerSendTextMessage(cid,22, c.msg[x])
return true
end
local money = 4000000 -- how much money you need.
local pos = {X = 160, Y = 60, Z = 7} -- where to be teleported.
local level = 1000
local c = {
con = function(id) return getPlayerLevel(id) >= level, getPlayerMoney(id) >= money end,
msg = {'You are to low level for this.', 'You need ' .. money .. ' gold coins to enter here.', 'off we go!'},
i = 1
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local condition, x = {c.con(cid)}, c.i
if condition[1] then
x = 2
if condition[2] then
x = 3
doPlayerRemoveMoney(cid, money)
doTeleportThing(cid, pos, TRUE)
end
end
doPlayerSendTextMessage(cid,22, c.msg[x])
return true
end
please stop... you don't know how to code... just stopTry this
Code:local money = 4000000 -- how much money you need. local pos = {X = 160, Y = 60, Z = 7} -- where to be teleported. local level = 1000 local c = { con = function(id) return getPlayerLevel(id) >= level, getPlayerMoney(id) >= money end, msg = {'You are to low level for this.', 'You need ' .. money .. ' gold coins to enter here.', 'off we go!'}, i = 1 } function onUse(cid, item, fromPosition, itemEx, toPosition) local condition, x = {c.con(cid)}, c.i if condition[1] then x = 2 if condition[2] then x = 3 doPlayerRemoveMoney(cid, money) doTeleportThing(cid, pos, TRUE) end end doPlayerSendTextMessage(cid,22, c.msg[x]) return true end