What's new

Actions God Fruits (Vestia.pl)

Status
Not open for further replies.

Skibi184

Active User
Joined
Jan 16, 2014
Messages
96
Reaction score
1
Witam,
Postanowi?em stworzy? prosty skrypt bardzo podobny do tego z Vestia.pl. Czyli GOD Fruits. Po u?yciu regeneruje ci si? mana o raz hp.

Items.xml :
Znajd?:
Code:
    <item id="2137" name="Some Golden fruits">
        <attribute key="weight" value="300" />
    </item>
Zamie?:
Code:
    <item id="2137" name="GOD Fruits">
        <attribute key="weight" value="300" />
    </item>

Stw?rz GodFruits.lua w actions/scripts/other
dodaj:
Code:
function onUse(cid, item, frompos, item2, topos)
        if getCreatureHealth(cid) == getCreatureMaxHealth(cid) and getCreatureMana(cid) == getCreatureMaxMana(cid) then
            doPlayerSendTextMessage(cid,22,"Twoje ?ycie oraz mana s? ju? pe?ne.")
        else
            doPlayerSendTextMessage(cid,22,"Twoje ?ycie oraz mana zosta?y odnowione.")
            doSendMagicEffect(getPlayerPosition(cid), 31)
            doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
            doCreatureAddMana(cid, getCreatureMaxMana(cid))
            doRemoveItem(item.uid, 1)
        end
end

w Actions.xml dodaj:
Code:
    <action itemid="2137" event="script" value="other/GodFruits.lua"/>

Gotowe.

Wiem ?e niekt?rzy by zrobili ten skrypt lepiej od mnie. :D Wi?c nie pisz ?e mog?em da? to zamiast tego itp.
 

MiksereQ

Banned
Joined
Jul 2, 2013
Messages
531
Reaction score
32
Odp: God Fruits (Vestia.pl)

Skrypt nie jest zly jak na ciebie, chociaz zrobiles to w jednym if a nie niektorzy daja po 100 xD.
3/5
 
Status
Not open for further replies.
Top