• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action campfire script

Animera

* * * * *
Joined
Dec 9, 2008
Messages
2,449
Solutions
5
Reaction score
618
Location
ANIMERARPG.ONLINE
Campfire script
This happens when you are bored..
I use this script for myself but i deide to share it cuz its 1 minute work anyway just wanted to share my imagination..
Maybe someone with no lua knowledge may like this..

What it does?
When you use a burning torch on a campfire it will add a magiceffect and turn it into a campfire with burning woods instead of just woods.
With text effect included and a 10% chance that the firecamp fail because of wind.
Should work on every server haven't tested it because i can't i am pretty sure it works if not send error code i will fix it.


/data/actions/scripts/other/firecamp.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local random = math.random(1, 100)
    if(isInArray(1422, itemEx.itemid)) then
        if(random > 10) then
        doTransformItem(itemEx.uid, itemEx.itemid + 1)
        doSendMagicEffect(toPosition, CONST_ME_HITBYFIRE)
        doCreatureSay(toPosition, "Wooosh!", TALKTYPE_ORANGE_1)
    else
        doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
        doCreatureSay(toPosition, "The wind blew the firecamp off, Please try again.", TALKTYPE_ORANGE_1)      
    end
end
return TRUE
end

/data/actions/actions.xml
Code:
<action itemid="2051;2053;2055" script="other/firecamp.lua"/>


Have fun,
Lagmacun
 

Attachments

Last edited:
Back
Top