• 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!

Vip teleport/mystic flame

Middan

New Member
Joined
Dec 24, 2013
Messages
22
Reaction score
0
Hello all!

iw serch all over the forums but culd not find anything abut it!

I got a vip place i just want vip players to be able to go to, but i dont want any doors to my teleporter. Just want the vip players to be able to go stright in to the tp whitout any doors, and other "ordenery" players shuld not be able to have access to this vip place.

are ther any tutorals that showing this or cane anyon help me whit this prblem?
using 8.6 client
 
using nothing at the moment ... first want to know what I should do with the teleport before I start doing it. but if you have any tuteral to it too, I'm very grateful!
 
Code:
function onStepIn(cid, item, position, fromPosition)
     if getPlayerVipDays(cid) > 0 then
         doTeleportThing(cid, {x = 100, y = 100, z = 7})
     else
         doPlayerSendCancel(cid, "You need to be vip to enter here.")
         doTeleportThing(cid, fromPosition)
     end
     return true
end

Then instead of getPlayerVipDays, the function your vip system is using.
 
got a Error says:

[Error - LuaScriptInterface::loadFile] cannot open data/actions/scripts/other/vip door.lua: no such file or directory
[warning - Event::loadScript] cannot loas script (data/actions/scripts/other/vip door.lua)
cannot open data/actions/scripts/other/vip door.lua: no such dile or directory

someone knows this problem?
 
This means you added it wrong.
Make sure you added it the folder other in actions and with name: vip door

If it still doesn't work, show how you added it in actions.xml and tell which server you use.
 
where shuld I place my cordynats? and what cordynats where? :S


doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
 
im aint geting it right
should i change it like this?

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

    if getPlayerStorageValue(cid,11333) < 1 then
        if getPlayerLevel(cid) > 1 then
            getPlayerStorageValue(cid, 11333)
            doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
            doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 15 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
            setPlayerStorageValue(cid, 11333, (getPlayerStorageValue(cid,11333) + 15))
            doRemoveItem(item.uid, 1)
        else
            doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
            doRemoveItem(item.uid, 1)
        end
    else
        doPlayerSendCancel(cid,"You are already a donator.")
    end   
return TRUE
end

To
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

    if getPlayerStorageValue(cid,11333) < 1 then
        if getPlayerLevel(cid) > 1 then
            getPlayerVipDays(cid)
            doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
            doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for 15 days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
            setPlayerStorageValue(cid, 11333, (getPlayerStorageValue(cid,11333) + 15))
            doRemoveItem(item.uid, 1)
        else
            doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
            doRemoveItem(item.uid, 1)
        end
    else
        doPlayerSendCancel(cid,"You are already a donator.")
    end   
return TRUE
end

or to
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

    if getPlayerVipDays(cid) > 0 then
        doTeleportThing(cid, {x = 100, y = 100, z = 7})
    else
        doPlayerSendCancel(cid, "You need to be vip to enter here.")
        doTeleportThing(cid, fromPosition)
    end
    return true
end
    else
        doPlayerSendCancel(cid,"You are already a donator.")
    end   
return TRUE
end


Realy bad at this! :(
 
getPlayerVipDays(cid) was just an example from an other vip system, you can't use that if your vip system isn't using that.

In the teleport script you only have to change getPlayerVipDays(cid) to getPlayerStorageValue(cid, 11333) for that vip system.
You can also use this one,
http://otland.net/threads/the-best-vip-system-ever-action-movevent-globalevent.71638/
This one is using the function getPlayerVipDays I gave as example, maybe it's more easy to understand.
 
Back
Top