• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

MoveEvent Vip Teleport for TIME.

Potar

SocialWorld
Senator
Joined
Mar 1, 2009
Messages
1,664
Reaction score
125
Location
Warsaw, Poland
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.

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:
Usefull script, but if you want to release something is it really to much work to test it then?

Shortened and fixed, lua comparison is == and table needs , after each value, wrong parameters for onStepIn
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
 
Usefull script, but if you want to release something is it really to much work to test it then?

Yea, I did not have access to my dedicated server ^_^.

I forgot a few things (like ,) , thx for fix it ^_^.
 
Back
Top