GM Gruby |
Wysłany: Czw 20:19, 27 Gru 2007 Temat postu: Skrypt na Marihuanę |
|
Skrypt na Marihuana
w data/actions/scripts Tworzymy plik ziolo.lua
a potem wklejamy to co jest niżej
Kod:
MAX_FOOD = 500
function onUse(cid, item, frompos, item2, topos)
-- Get food value depending on item.itemid
food = 60
if (getPlayerFood(cid) + food > MAX_FOOD) then
doPlayerSendCancel(cid,"O fuck... I took tooo much.")
return 1
end
doPlayerFeed(cid,food)
doRemoveItem(item.uid,1)
doPlayerAddHealth(cid,350)
doSendMagicEffect(topos,2)
doPlayerSay(cid,"It is great stuff!",1)
return 1
end
Potem wklejamy linjkę
<action itemid="5953" script="ziolo.lua" />
do data/actions/actions.xml |
|