What's new

Actions Event box !

Status
Not open for further replies.

qwasniak

Advanced User
Joined
May 9, 2013
Messages
303
Reaction score
7
Bez zb?dnego pisania ;)
Actions.xml :
[XML]<action itemid="9941" event="script" value="prezent.lua"/>[/XML]
A teraz data/actions/scripts/prezent.lua
[LUA]
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(not checkExhausted(cid, 103, 5)) then
return true
end
local gifts = {7958, 7450, 9931, 8880, 7697, 8858, 2538, 2437, 2508, 2352, 7416, 8300, 2644, 9778, 8865, 8890, 3983, 9933, 7735, 9693, 8306, 2506, 8888, 9777, 8850, 6529, 6433, 8903, 2496, 9776, 2469, 6391, 8925, 7422, 2390, 7722, 8300}
doPlayerAddItem(cid, gifts[math.random(#gifts)], 1)
doDecayItem(item.uid)
doSendMagicEffect(toPosition, 12)
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid, 1)
return true
end[/LUA]
No to tyle ;P
 

qwasniak

Advanced User
Joined
May 9, 2013
Messages
303
Reaction score
7
Odp: Event box !

Sorrki nie wiedzia?em, napisa?em bo m?le ?e komu? si? przyda
 
Last edited:
Status
Not open for further replies.
Top