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

Lua doPlayerAddMagLevel

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,782
Solutions
25
Reaction score
491
Location
Sweden
Hello, I need some help with my script I guess. Hopefully someone can tell me the problem:

EDIT: Needed help with a script, rewrote it and I'm pasting it below:

Code:
function onUse(cid, item, frompos, item2, topos)

local amount

if item.itemid == 1968 then
    local n
    if getPlayerStorageValue(cid, 2001) == 1 then
        if isInArray({2,3,6,7}, getPlayerVocation(cid)) then
            n=3
        elseif isInArray({4,8}, getPlayerVocation(cid)) then
            n=2
        elseif isInArray({1,5}, getPlayerVocation(cid)) then
            n=5
        end
        doPlayerAddMagLevel(cid, amount)
        doPlayerSendTextMessage(cid, 22, "You have advanced "..amount.." magic levels!")
        doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
    end
    n=amount
    return true
end
 
Last edited:
Back
Top