hello, well first of all, I apologize for my spelling, I do not speak much English XD.
Well based on the code from C + + "doPlayerCastSpell", I wondered if maybe someone could help me with a code like that, but to fulfill the function of executing a command (talkaction), maybe something like "doPlayerExecuteCommand" or something like that .. .
the idea is that I serve with this script:
Well based on the code from C + + "doPlayerCastSpell", I wondered if maybe someone could help me with a code like that, but to fulfill the function of executing a command (talkaction), maybe something like "doPlayerExecuteCommand" or something like that .. .
the idea is that I serve with this script:
Code:
local t = {
[11420] = {text= "!points add, axe, 1"},
[11421] = {text= "!points add, club, 1"},
[11422] = {text= "!points add, distance, 1"},
[11423] = {text= "!points add, magic, 1"},
[11424] = {text= "!points add, shielding, 1"},
[11425] = {text= "!points add, sword, 1"}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = t[item.itemid]
if v then
doPlayerExecuteCommand(cid, v.text)
return true
end
end