Hello i want to public really easy script, didnt test you should do it and give me any errors.
How it works?
Player can enter tot he teleport if he have for example 1 vip coin or 100 gold, and he can enter again without pay for next 1 day.
As i said i didnt test it, so please paste any errors ^_^
Inspired by one of support theard (dunno who).
If all will be ok, just REP me ^_^
How it works?
Player can enter tot he teleport if he have for example 1 vip coin or 100 gold, and he can enter again without pay for next 1 day.
Lua:
local PS = {
TIME = 1 * 60 * 60, -- its for 1 hours, you can exchange it but remember! this is in seconds.
STORAGE = 10000, -- time storage
PAY = "money", -- money / item
ITEM = {2152, 3}, -- item and ammount (if item)
MONEY = 1000, -- ammount of money (if money)
PLACE = {x = 857, y = 969, z = 7}
}
function onStepIn(cid, item, position, lastPosition)
if getPlayerStorageValue(cid,PS.STORAGE) > os.time() then
doTeleportThing(cid, PS.PLACE)
doCreatureSay(cid, "Welcome in VIP island!", TALKTYPE_ORANGE_1)
return true
end
if (PS.PAY == "item" and doPlayerRemoveItem(cid,PS.ITEM[1], PS.ITEM[2])) or (PS.PAY == "money" and doPlayerRemoveMoney(cid, PS.MONEY)) then
doPlayerSetStorageValue(cid, PS.STORAGE, os.time() + PS.TIME)
doTeleportThing(cid, PS.PLACE)
doCreatureSay(cid, "Welcome in VIP island!", TALKTYPE_ORANGE_1)
return true
end
doTeleportThing(cid, lastPosition)
doCreatureSay(cid, (PS.PAY == "item" and "You dont have enough items!" or "You don't have enough money!"), TALKTYPE_ORANGE_1)
doSendMagicEffect(lastPosition, CONST_ME_POFF)
return true
end
As i said i didnt test it, so please paste any errors ^_^
Inspired by one of support theard (dunno who).
If all will be ok, just REP me ^_^
Last edited: