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

Script Vocation Tile

mike

Banned User
Joined
Jun 12, 2008
Messages
150
Reaction score
0
Location
Caracas Venezuela
Well here I have a script that is what it means to spend premmy nothing more. (This based walk south to get back to the north).


Why do a walk that you return to the north to the south? and that can only happen Sorcerer and Druid and other well but just passing Knight and Paladin? thanks.

Code:
function onStepIn(cid, item, pos)
local p = getPlayerPosition(cid)
local nppos = {x=p.x-1, y=p.y, z=p.z, stackpos=1}

if item.actionid == 2000 then
    if getPlayerPremiumDays(cid) > 1 then
else
doTeleportThing(cid,nppos)
doPlayerSendTextMessage(cid,22,"Solo pueden pasar personas VIP Account. Para comprar vip account diga needvip para mas informacion.")
end
end
end

I think these are the functions that I have:

Code:
function isSorcerer(cid)
    if(isPlayer(cid) == FALSE) then
        debugPrint("isSorcerer: Player not found.")
        return false
    end

    return (isInArray({1,5}, getPlayerVocation(cid)) == TRUE)
end

function isDruid(cid)
    if(isPlayer(cid) == FALSE) then
        debugPrint("isDruid: Player not found.")
        return false
    end

    return (isInArray({2,6}, getPlayerVocation(cid)) == TRUE)
end

function isPaladin(cid)
    if(isPlayer(cid) == FALSE) then
        debugPrint("isPaladin: Player not found.")
        return false
    end

    return (isInArray({3,7}, getPlayerVocation(cid)) == TRUE)
end

function isKnight(cid)
    if(isPlayer(cid) == FALSE) then
        debugPrint("isKnight: Player not found.")
        return false
    end

    return (isInArray({4,8}, getPlayerVocation(cid)) == TRUE)
end

function getConfigInfo(info)
    if (type(info) ~= 'string') then return nil end

    dofile('config.lua')
    return _G[info]
end

function getPlayerMoney(cid)
    return ((getPlayerItemCount(cid, ITEM_CRYSTAL_COIN) * 10000) + (getPlayerItemCount(cid, ITEM_PLATINUM_COIN) * 100) + getPlayerItemCount(cid, ITEM_GOLD_COIN))
end

function table.find(table, value)
    for i,v in pairs(table) do
        if (v == value) then
            return i
        end
    end
    return nil
end

Thanks.
 
Last edited:
function onStepIn(cid, item, pos)
local p = getPlayerPosition(cid)
local nppos = {x=p.x-1, y=p.y, z=p.z, stackpos=1}

if item.actionid == 2000 and isSorcerer(cid) then
if getPlayerPremiumDays(cid) > 1 then
else
doTeleportThing(cid,nppos)
doPlayerSendTextMessage(cid,22,"Solo pueden pasar personas VIP Account. Para comprar vip account diga needvip para mas informacion.")
end
end
end

I don't know if it works, i just added "and isSorcerer".

GoodLook
DX~
 
Code:
function onStepIn(cid, item, pos, frompos)
if item.actionid == 2000 and isSorcerer(cid) == TRUE and isPremium(cid) == TRUE then
----Here your code if player is vip-----
else
doTeleportThing(cid,frompos)
doPlayerSendTextMessage(cid,22,"Solo pueden pasar personas VIP Account. Para comprar vip account diga needvip para mas informacion.")
end
end
 

Similar threads

Back
Top