• 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 Easy Power Up Action, Easy Edit. WITH OUTFIT CHANGE.

Blood BlvD Ot

Member
Joined
Jun 12, 2010
Messages
243
Reaction score
7
Well on my ot, I have a vocation called the Elementalist. And I wanted him to morph into an element and get a magic level buff.

After learning that there is so many different complicated versions of this script. I decided to release this easy one for the noober scripters out there like me :)


create@ actions/scripts/buffitem.lua
Code:
-- Blood BlvD Ot
-- Simple Productions
-- By Daniel Couillard. 
-- [email protected]

local condition = createConditionObject(CONDITION_ATTRIBUTES)                   --  >>> LOCALS <<<
setConditionParam(condition, CONDITION_PARAM_TICKS, 50000)                      --  The Lenght of this entire proccess.
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVELPERCENT, 350)       --  -
																			    --  |   \/ Should Be The Same /\
local conditionRed = createConditionObject(CONDITION_OUTFIT)					--  -
        setConditionParam(conditionRed, CONDITION_PARAM_TICKS, 50000)           --  The Lenght of this entire proccess.
        addOutfitCondition(conditionRed, {lookType = 286, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94}) -- The Outfit that you want to change into.
		
local condition2 = createConditionObject(CONDITION_LIGHT)                       -- If you want, you can add a lighting effect.
setConditionParam(condition2, CONDITION_PARAM_LIGHT_LEVEL, 10)                  -- The Strenght of the light. Goes Down Over Time.
setConditionParam(condition2, CONDITION_PARAM_LIGHT_COLOR, 144)                 -- The Color, This one is darkRed.
setConditionParam(condition2, CONDITION_PARAM_TICKS, 75000)                     -- Try and balance this one out with the others.. Balanced with the other times,

		
function onUse(cid, item, frompos, item2, topos)

if(isInArray({18,22,26,30}, getPlayerVocation(cid)) == TRUE) then               -- The Vocations of wich u want to be able to use this.

		var = numberToVariant(cid)
		
		doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)          -- The Magic Effect that happens on use.
		doAddCondition(cid, conditionRed)										-- |
		doAddCondition(cid, condition2)											-- |>>> ADDING THE LOCALS <<<
		doAddCondition(cid, condition)											-- |
		
                 doSendAnimatedText(getPlayerPosition(cid),"ROAARRR", math.random(01,255)) -- The text that you want to pop up :D
		doRemoveItem(item.uid, 1)                                               -- Keep this here, if u want the item to be removed upon its use.
		
else
doPlayerSendTextMessage(cid,22,"Hmm.. This stone only seems to glow around the area of an Elementalist.")  -- And of course, the failed attempt message.
return 1
end
end

Add Into actions.xml
Code:
	<action itemid="#" script="buffitem.lua"/>

On here you can play around with different :
Lighting colors and brightness
Outfits. With change of colors or plain monster.
Add different buffs with ease.

Well :D, this is my first post. Hope the script works awsome for u.
 
Always looking for suggestive comments ;).
Ya know, so i get as good as all you greats on here ^^.
 
okk
LUA:
-- Blood BlvD Ot
-- Simple Productions
-- By Daniel Couillard. 
-- [email][email protected][/email]

local condition = createConditionObject(CONDITION_ATTRIBUTES)                   --  >>> LOCALS <<<
setConditionParam(condition, CONDITION_PARAM_TICKS, 50000)                      --  The Lenght of this entire proccess.
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVELPERCENT, 350)       --  -
                                                                                --  |   \/ Should Be The Same /\
local conditionRed = createConditionObject(CONDITION_OUTFIT)                    --  -
setConditionParam(conditionRed, CONDITION_PARAM_TICKS, 50000)           --  The Lenght of this entire proccess.
addOutfitCondition(conditionRed, {lookType = 286, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94}) -- The Outfit that you want to change into.
        
local condition2 = createConditionObject(CONDITION_LIGHT)                       -- If you want, you can add a lighting effect.
setConditionParam(condition2, CONDITION_PARAM_LIGHT_LEVEL, 10)                  -- The Strenght of the light. Goes Down Over Time.
setConditionParam(condition2, CONDITION_PARAM_LIGHT_COLOR, 144)                 -- The Color, This one is darkRed.
setConditionParam(condition2, CONDITION_PARAM_TICKS, 75000)                     -- Try and balance this one out with the others.. Balanced with the other times,

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if isInArray({18,22,26,30}, getPlayerVocation(cid) then               -- The Vocations of wich u want to be able to use this.
        doTargetCombatCondition(0, cid, condition, CONST_ME_MAGIC_RED)          -- The Magic Effect that happens on use.
        doAddCondition(cid, conditionRed)                                        -- |
        doAddCondition(cid, condition2)                                            -- |>>> ADDING THE LOCALS <<<
        doAddCondition(cid, condition)                                            -- |
        doSendAnimatedText(fromPosition,'ROAARRR', math.random(255)) -- The text that you want to pop up :D
        doRemoveItem(item.uid, 1)                                               -- Keep this here, if u want the item to be removed upon its use.
    else
        doPlayerSendTextMessage(cid, 22, 'Hmm.. This stone only seems to glow around the area of an Elementalist.')  -- And of course, the failed attempt message.
        return true
    end
end
 
if isInArray({18,22,26,30}, getPlayerVocation(cid) then

u forgot the == TRUE) before then. :O that would result in an error wouldnt it?
 
if isInArray({18,22,26,30}, getPlayerVocation(cid) then

u forgot the == TRUE) before then. :O that would result in an error wouldnt it?
not at 0.3
i just updated the params and shortened it a bit, not really necessary
 
More Detail.

With this item, an elementalist can upgrade your damage?

With this, you can set the action id onto an item.
The script allows you to:
Choose what vocation ids.
What power ups.
what light color and power.
The time period of both the buff and light.
The outfit, along with its colors of head body legs and feet.

On the use of this item it sends an effect, changes the outfit. And adds a bonus +% magic level to the character for a sertain amount of time and takes the item away.

Hope this helped :D
 
Last edited:
Your Elementalist only have this skill?

Well i have it as a magic item they can use to power up.
And yes, they are the only ones that are able to use this item.
I used midnight shard, its a good one to choose :P.

it is not a spell! lol :D
 
Back
Top