Teddy
SweStream.se
Can some make a item when you use it on your self you get a new spell and you can only get that spell from that item :O ?
local spell = "Spell Name Here"
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not getPlayerLearnedInstantSpell(cid, spell) then
doPlayerLearnInstantSpell(cid, spell)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned the spell " .. spell .. ".")
else
doCreatureSay(cid, "You have already learned this spell!", TALKTYPE_ORANGE_1, nil, cid, getThingPos(cid))
end
return true
end
LUA:local spell = "Spell Name Here" function onUse(cid, item, fromPosition, itemEx, toPosition) if not getPlayerLearnedInstantSpell(cid, spell) then doPlayerLearnInstantSpell(cid, spell) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have learned the spell " .. spell .. ".") else doCreatureSay(cid, "You have already learned this spell!", TALKTYPE_ORANGE_1, nil, cid, getThingPos(cid)) end return true end
ive posted like 4 scripts like this and so has cykotitan, shoulve been relatively easy to find.
just make new action script & register@ actions.xml![]()
choose an ID yourself and then register it in actions.xml? how is that hard ;|? just copy an existing line