• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action The healing tree [MY FIRST SCRIPT!]

Grehy

Killroy
Joined
Nov 21, 2008
Messages
2,631
Reaction score
33
Location
United States
Just a simple script, add it in your temple or in some other place. Its my first 100% self made script, so I just wanted to show-off :eek:


Code:
function onUse(cid, item, frompos, item2, topos)
    if item.actionid == 5751 then
        doPlayerAddMana(cid, 3000)
        doCreatureAddHealth(cid, 3000)
        doCreatureSay(cid, "The tree refils your tired soul!", TALKTYPE_ORANGE_1)
        doSendMagicEffect(frompos, CONST_ME_MAGIC_BLUE)
    else
    doPlayerSendCancel(cid, "Sorry, not possible")
    end
end
 
Good but you dont have to put actionid, you can do that in .xml

Lua:
 function onUse(cid, item, frompos, item2, topos)
        doPlayerAddMana(cid, 3000)
        doCreatureAddHealth(cid, 3000)
        doCreatureSay(cid, "The tree refils your tired soul!", TALKTYPE_ORANGE_1)
        doSendMagicEffect(frompos, CONST_ME_MAGIC_BLUE)
    else
		doPlayerSendCancel(cid, "Sorry, not possible")
		return TRUE
    end

ir works with return TRUE and without it :)
 
Back
Top