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

Chest Vocations

Stewie

Family Guy # ;3
Joined
May 3, 2010
Messages
786
Reaction score
12
Location
TV
Hi Otlanders,

someone can make a chest when sorc open add 10 ML,and 20 level,druid add 10 ml and 20 lvl,knight add 2 ml,5 axe,5 shield and 20 level,paladin add 5 ml ,6 distance,5 shield and 20 level.

Thanks
 
Im not the best at scripting but here is an incomplete version, it needs SkillIDs as i dont have them. If someone builds off this please +Rep


LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local action = xxxx -- put the Actionid of the chest
local vocation = getPlayerVocation(cid)
local smanaspent = XXXX --ammount of mana spent you want / this adds mlevel for sorcerer, druid
local pmanaspent = XXXX --ammount of mana spent you want / this adds mlevel for paladin
local slevel = doPlayerAddLevel(cid, amount)
local axe = 5 -- number of distance tries to add
local shield = 	5 -- number of distance tries to add
local distance = 6 -- number of distance tries to add
local sorcerer = 1
local druid = 2
local paladin = 3
local knight = 4
local mastersorcerer = 5
local elderdruid = 6
local royalpaladin = 7
local eliteknight = 8

    if item.actionid == action then
            if getPlayerStorageValue(cid,action) == -1 then
                    if vocation == sorcerer or vocation == mastersorcerer or vocation == druid or vocation == elderdruid then
                        doPlayerAddSpentMana(cid, smanaspent)
                        doPlayerSendTextMessage(cid,25, "Here is your reward.")
                        setPlayerStorageValue(cid,action,1)
                    end
            else
                    doPlayerSendCancel(cid,"You already got your reward!")
            end
 
 
    elseif item.actionid == action then
            if getPlayerStorageValue(cid,action) == -1 then
                    if vocation == paladin or vocation == royalpaladin then
                        doPlayerAddSkillTry(cid, skillid, distance)
						doPlayerAddSpentMana(cid, pmanaspent)
                        doPlayerSendTextMessage(cid,25, "Here is your reward.")
                        setPlayerStorageValue(cid,action,1)
                    end
            else
                    doPlayerSendCancel(cid,"You already got your reward!")
            end
 
    elseif item.actionid == action then
            if getPlayerStorageValue(cid,action) == -1 then
                    if vocation == knight or vocation == eliteknight then
						doPlayerAddSkillTry(cid, skillid, axe)
						doPlayerAddSkillTry(cid, skillid, shield)
                        doPlayerSendTextMessage(cid,25, "Here is your reward.")
                        setPlayerStorageValue(cid,action,1)
                    end
            else
                    doPlayerSendCancel(cid,"You already got your reward!")
            end
        end
end
 
Back
Top