• 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 Healing Fountain & Paralyzer Bow

Shadowsong

Game Developer & Graphic Designer
Joined
Feb 23, 2010
Messages
3,446
Solutions
21
Reaction score
3,001
Location
Bosnia & Herzegovina
YouTube
ShivaShadowsong
Thought I should contribute something, so here's a couple of simple, yet useful scripts I use on my server.
Compatible with 0.3.6+ (if you face any difficulties, leave a post).

Healing Fountain
┌───────────────────────────────
2r635vp.jpg

It is a healing fountain which can heal both mana and HP, and has a definable exhaustion so it can't be spammed (if you don't want it to). If you want it to heal something else, like soul, or % of HP/mana, write it in a reply.

(actions/scripts/fountain.lua):
Code:
local exhaustionStorage = [COLOR=#FF0000]2555[/COLOR] [COLOR=#FF0000]-- Storage value for exhastion[/COLOR]
local HPamount = [COLOR=#008000]50[/COLOR] -- [COLOR=#008000]amount of HP healed[/COLOR]
local MPamount = [COLOR=#800080]50[/COLOR] -- [COLOR=#800080]amount of mana healed[/COLOR]
local time = [COLOR=#FF0000]180[/COLOR] -- [COLOR=#FF0000]Time of exhaustion (in seconds)[/COLOR]

function onUse(cid, item, frompos, topos)
if not(exhaustion.check(cid,exhaustionStorage)) then
        doCreatureAddHealth(cid, HPamount)
        doCreatureAddMana(cid, MPamount)
        doSendMagicEffect(getCreaturePosition(cid),1)
         exhaustion.set(cid,exhaustionStorage,time)
        doSendAnimatedText(getPlayerPosition(cid), "Gulp.", TEXTCOLOR_TEAL)
            return true
else
        doPlayerSendCancel(cid, "[COLOR=#FF8C00]Can't drink any more water for now.[/COLOR]")
        doSendMagicEffect(getCreaturePosition(cid),2)
end
return false
end

(actions/actions.xml):
Code:
<action itemid="6390" event="script" value="fountain.lua"/>

Paralyzer Bow
──────────────────────────────
Elethriel's_Elemental_Bow.gif

This bow will, upon being used (right click on it), paralyze your target. It has a configurable amount of time between its usages, you can also play with the values of paralyze to get the right intensity, etc. Pretty nice for boosting paladins' PvP.

(actions/scripts/parabow.lua):
Code:
local condition2 = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition2, CONDITION_PARAM_TICKS, [COLOR=#00FF00]6500[/COLOR]) --- duration of paralyze
setConditionFormula(condition2, [COLOR=#00FF00]-0.4, 0, -0.7, 0[/COLOR]) --- strength of paralyze

function onUse(cid, item, fromPosition, itemEx, toPosition)
local tPos = getCreaturePosition(getCreatureTarget(cid))
[COLOR=#006400]--- CONFIG ---
local levelReq = [COLOR=#00FF00]50[/COLOR] -- level required to use this effect
local vocID = [COLOR=#00FF00]4[/COLOR] -- ID of vocation that can use this effect
local exhStorage =[COLOR=#00FF00] 5450[/COLOR] -- storage for exhaustion between usages
local exhTime = [COLOR=#00FF00]50[/COLOR] -- time of exhaustion (in seconds)
--- CONFIG ---[/COLOR]

    if getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == 8858 or getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == 8858 then
        if getPlayerLevel(cid) >= levelReq then
            if getPlayerVocation(cid) == vocID then
                if getCreatureTarget(cid) ~= 0 then
                    if not(exhaustion.check(cid,exhStorage)) then
                    exhaustion.set(cid, exhStorage, exhTime)
                    doSendDistanceShoot(fromPosition, tPos, 34)
                    doCreatureSay(cid, "Freeze!", 19)
                    doSendMagicEffect(tPos, 43)
                    doAddCondition(getCreatureTarget(cid), condition2)
                    doSendMagicEffect(fromPosition, 14)
                    else
                    doPlayerSendCancel(cid, "You need to wait "..exhaustion.get(cid, exhStorage).." seconds before you can use it again.")
                    end
                else
                doPlayerSendCancel(cid, "You need a target.")    
                end
            else
            doPlayerSendCancel(cid, "Your vocation can not use this item.")        
            end
        else
        doPlayerSendCancel(cid, "Your level is too low to use this item.")
        end
    else
    doPlayerSendCancel(cid, "You must equip this item first.")
    end

end

(actions/actions.xml):
Code:
<action itemid="8858" event="script" value="parabow.lua"/>
 
I love the bow idea! It will still work as regular bow right?
Rep++
 
Yes of course. For anyone who knows a bit about scripting, it's an effective way to edit weapons to give them such effects - you can basically do anything you want, just a bit of creativity is required. ^_^
 
It's kinda easy scripts, but thanks for sharing to those who doesn't know how to script :)
 
Its all about creativity... I have knowledge and skills but i am lack of creativity... and therefor i find this script really useful.
 
Its all about creativity... I have knowledge and skills but i am lack of creativity... and therefor i find this script really useful.

Hehe, I'm glad you do. :D

It's kinda easy scripts, but thanks for sharing to those who doesn't know how to script :)

No problem, I hope someone will find use of them!
 
Kinda of old i remember i saw this on forgottenl.se 8.54 8.60 :) it did heal full mana/hp
 
Kinda of old i remember i saw this on forgottenl.se 8.54 8.60 :) it did heal full mana/hp

But those two scripts are scripts you can transform into literally over hundreds of uses in just a couple adjustments each script/use.
 
Thanks. I got an idea today for a handy rpgish script, if not even a good damage-style for a vocation - a Voodoo Doll of a desired person which would deal some damage to them wherever they are on the map upon being used. Gonna write it when I have time :3
 
maybe u have to use a vial on THEIR spilt blood/corpse first. And onlook of the doll "This is a voodoo doll of shadowsong" And use it causes "love effect" and use with knife or something removes like 10hp :>. With an exhuast obviously (and you and the person must be out of pz. Or you could pz kill people. :eek:)

- - - Updated - - -

for vial thing, then use vial on voodoo dol to curse it :>
 
maybe u have to use a vial on THEIR spilt blood/corpse first. And onlook of the doll "This is a voodoo doll of shadowsong" And use it causes "love effect" and use with knife or something removes like 10hp :>. With an exhuast obviously (and you and the person must be out of pz. Or you could pz kill people. :eek:)

- - - Updated - - -

for vial thing, then use vial on voodoo dol to curse it :>


That's such a good idea. Hell, you can make this system as the main system of a voc, and have the doll "burn up" when used, and you can mix diff ingredients with blood to make diff effects, like paralyzation, healing, debuff, etc.

Oh, and to balance it, make the "spell" take up soul points :)
 
Well I will make it how I originally imagined it, and once the main thing is done, anyone can change it to their needs - such as the previous scripts. :3
 
Also shadow, the beach of tjenn will be complete, but the forest wont, only the entrance (so for those screens, just do the beach :p - there is also the underground cave bit to explore also if you wish ;D will send it tomorrow when finish the cave
 
Also shadow, the beach of tjenn will be complete, but the forest wont, only the entrance (so for those screens, just do the beach :p - there is also the underground cave bit to explore also if you wish ;D will send it tomorrow when finish the cave

Alrighty mate, I'm eagerly awaiting it!

Use it in your awesome RPG server ;)
Yes I will. :D
 
Really hope you release more scripts, maybe a weapon script like Para Bow, but instead of onUse, it'd be onHit with chance :p
 
I'm getting debugged on use of the item.

Error: <luaGetThingPosition> thing not found

using The Forgotten Server v0.2.14
 
Last edited:
Back
Top