Hello
I'm new to lua and I could really need some help here.
This is how I want it to work.
New players pull a lever and get items for his vocation.
All vocations pull the same lever, but different rewards.
This is what I accomplished so far;
Is there any better method for doing this?
Can I send multiple itemIDs with "doPlayerAddItem"?
Also, I have no idea how to bind this script to the correct lever ingame...
Should I use a action ID on my lever?
Thanks in advance.
I'm new to lua and I could really need some help here.
This is how I want it to work.
New players pull a lever and get items for his vocation.
All vocations pull the same lever, but different rewards.
This is what I accomplished so far;
Code:
function onUse( cid, item, fromPosition, itemEx, toPosition)
if isSorcerer(cid) then
doPlayerAddItem(cid, 3557, 1)
elseif isDruid(cid) then
doPlayerAddItem(cid, 3557, 1)
elseif isPaladin(cid) then
doPlayerAddItem(cid, 3557, 1)
elseif isKnight(cid) then
doPlayerAddItem(cid, 3557, 1)
end
end
Is there any better method for doing this?
Can I send multiple itemIDs with "doPlayerAddItem"?
Also, I have no idea how to bind this script to the correct lever ingame...
Should I use a action ID on my lever?
Thanks in advance.