ond
Veteran OT User
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:
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: