Lakh
Banned User
Hey, is there a script where you click on an object, and you get a certain vocation?
local itemID = xxxx -- enter itemid here --
local voc = x -- enter voc id here --
function onUse(cid, item, frompos, item2, topos)
if item.itemid == itemID then
doPlayerAddVocation(cid, voc)
doRemoveItem(cid, item.uid)
doPlayerSendTextMessage(cid,22,"You Are Now A "..voc.."."")
end
return true
end
LUA:local itemID = xxxx -- enter itemid here -- local voc = x -- enter voc id here -- function onUse(cid, item, frompos, item2, topos) if item.itemid == itemID then doPlayerAddVocation(cid, voc) doRemoveItem(cid, item.uid) doPlayerSendTextMessage(cid,22,"You Are Now A "..voc.."."") end return true end
this is not tested and created via mobile so tell me if it works or no![]()
Rofl, via mobile? Wat!
Rofl, via mobile? Wat!
local voc = x -- enter voc id here --
function onUse(cid, item, frompos, item2, topos)
doPlayerAddVocation(cid, voc)
doRemoveItem(item.uid, 1)
doPlayerSendTextMessage(cid,22,"You Are Now A "..getPlayerVocation(cid)..".")
return true
end
nahh iphones are very helpful took about 3 mins and sorry for going offtopic about the via mobile thing :dMust've taken like an hour.
local vocations = {1,2,3,4,5,6,7,8} -- All vocation ids.
local vocation = 5 -- Set the players vocation with this vocation id.
function onUse(cid, item, frompos, item2, topos)
doPlayerSetVocation(cid, vocations[vocation])
doPlayerSendTextMessage(cid, 22, "You are now a ".. getPlayerVocationName(vocation) ..".")
doSendMagicEffect(getCreaturePosition(cid), 12)
doRemoveItem(item.uid, 1)
return true
end
local vocid = 4 -- id vocation
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerSetVocation(cid, vocid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are now a ".. getVocationInfo(vocid).name..".")
doSendMagicEffect(getCreaturePosition(cid), 12)
doRemoveItem(item.uid, 1)
return true
end