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

Solved Scroll Vocations

crashgb

Crash
Joined
Aug 20, 2013
Messages
48
Reaction score
0
local storage = 43855

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, storage) >= 4 then
return doPlayerSendCancel(cid, "You already used it 5x.")
end
doRemoveItem(item.uid, 1)
doPlayerAddMagLevel(cid, 1)
setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1)
return true
end


i have this actions, but i need that only can use Sorcerer, Druid, Master Sorcerer and Elder Druid.

please, thanks :D
 
Use Limos much better
Code:
local storage = 43855

function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isInArray({1, 2, 5, 6}, getPlayerVocation(cid)) then
return doPlayerSendCancel(cid, "This is only for sorcerers and druids.")
end
if getPlayerStorageValue(cid, storage) >= 4 then
return doPlayerSendCancel(cid, "You already used it 5x.")
end
if isKnight(cid) or isPaladin(cid) then
return doPlayerSendCancel(cid, "You are not a magge.")
end
doRemoveItem(item.uid, 1)
doPlayerAddMagLevel(cid, 1)
setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1)
return true
end


To use
Code:
 This
Simple
Use this without spaces [ code ] Your code goes here [ /code ]
will look like this
Code:
  Your code goes here
 
Last edited:
dont work, i can use more than 5 times.

thanks RosOT, i fix your script

local storage = 43855

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, storage) >= 4 then
return doPlayerSendCancel(cid, "You already used it 5x.")
end
if isKnight(cid) or isPaladin(cid) then
return doPlayerSendCancel(cid, "You are not a magge.")
end
doRemoveItem(item.uid, 1)
doPlayerAddMagLevel(cid, 1)
setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1)
return true
end


PD. how can i put my script in code? <code></code>?
 
Last edited by a moderator:
Under function onUse
Code:
if not isInArray({1, 2, 5, 6}, getPlayerVocation(cid)) then
     return doPlayerSendCancel(cid, "This is only for sorcerers and druids.")
end

Edit: Didn't see the new post.

Use
[ code]
script code here
[/code]

Without space between [ and code
 
Under function onUse
Code:
if not isInArray({1, 2, 5, 6}, getPlayerVocation(cid)) then
     return doPlayerSendCancel(cid, "This is only for sorcerers and druids.")
end

Edit: Didn't see the new post.

Use
[ code]
script code here
[/code]

Without space between [ and code
You and your godlike reply's they are to fast :)
 
Back
Top