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

ActionScript/Rep++

-.Savage.-

New Member
Joined
Jul 2, 2008
Messages
32
Reaction score
2
Need Help with a script, when you click use
its suppose to check your vocation, and
if its not ur vocation send a cancel message
if some1 can help, ill rep you!


Lua:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 14510 then
if item.itemid == 5777 then

  nplayer1pos = {x=250, y=250, z=7}
  doTeleportThing(cid,nplayer1pos)
  doSendMagicEffect(nplayer1pos,10)
  doSendMagicEffect(topos,6)
  doSendMagicEffect(frompos,6)
end
end
return 1
end
 
Lua:
local config = {pos = {x=250, y=250, z=7}, voc = {1,2,3,5,5,6}}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if isInArray(config.voc, getPlayerVocation(cid)) == TRUE then
        doTeleportThing(cid, config.pos)
        doSendMagicEffect(config.pos, 10)
        doSendMagicEffect(toPosition, 6)
        doSendMagicEffect(fromPosition, 6)
    else
	doPlayerSendCancel(cid, "wrong vocation")
    end
   return TRUE
end
 
Back
Top