• 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!

Change Element Of Wand

Joined
Sep 29, 2009
Messages
224
Reaction score
0
I Need Scripts Do Change Element Of Wand.

Ex: I Have One Vip Wand (holly)
And I Say: !wand fire
And Vip Wand (fire).

And !wand help (For Informations)

Thx
 
you can make it work with storage values you set one for each element then you make a combat situation depending on your storage value in weapons. right now i dont have the time to make the scripts but maybe with this info you can get it to work or have someone else do it before i can.
 
You could do it somewhat in this format and have multiple wands:

Lua:
Talkaction:
ifDoplayerRemoveItem(blablla) then
doPlayerAdditem(blalabla)
Etc
 
u can use this one

fire wand:

Code:
function onSay(cid, words, param)
	if (not isPremium(cid)) then
   doPlayerSendCancel(cid, "you need to be premium to use this action.")
  else
            doPlayerSetStorageValue(cid, 40001, 1)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREATTACK)
		end
		end

talkactions.xml:

Code:
<talkaction words="!wand fire" event="script" value="fire wand.lua"/>

you have to make one for each element ^^

vip wand:

Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -1, 0, -1, 0, 5, 5, 1.2, 2.42)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -1, 0, -1, 0, 5, 5, 1.2, 2.42)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLICE)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -1, 0, -1, 0, 5, 5, 1.2, 2.42)

local combat4 = createCombatObject()
setCombatParam(combat4, COMBAT_PARAM_TYPE, COMBAT_EARTHDAMAGE)
setCombatParam(combat4, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_EARTH)
setCombatFormula(combat4, COMBAT_FORMULA_LEVELMAGIC, -1, 0, -1, 0, 5, 5, 1.2, 2.42)

local combat5 = createCombatObject()
setCombatParam(combat5, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(combat5, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
setCombatFormula(combat5, COMBAT_FORMULA_LEVELMAGIC, -1, 0, -1, 0, 5, 5, 1.2, 2.42)

local combat6 = createCombatObject()
setCombatParam(combat6, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat6, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
setCombatFormula(combat6, COMBAT_FORMULA_LEVELMAGIC, -1, 0, -1, 0, 5, 5, 1.2, 2.42)




function onUseWeapon(cid, var)
if getPlayerStorageValue(cid, 40001) == 1 then
	return doCombat(cid, combat1, var)
elseif getPlayerStorageValue(cid, 40002) == 1 then
	return doCombat(cid, combat2, var)
elseif getPlayerStorageValue(cid, 40003) == 1 then
	return doCombat(cid, combat3, var)
elseif getPlayerStorageValue(cid, 40004) == 1 then
	return doCombat(cid, combat4, var)
elseif getPlayerStorageValue(cid, 40005) == 1 then
	return doCombat(cid, combat5, var)
elseif getPlayerStorageValue(cid, 40006) == 1 then
	return doCombat(cid, combat6, var)
   doPlayerSendCancel(cid, "you do not meet the conditions to use this wand.")
end
end

weapons.xml
Code:
	<wand id="[COLOR="Red"]id of your wand[/COLOR]" level="[COLOR="#ff0000"]level requeriment you want[/COLOR]" mana="[COLOR="#ff0000"]mana usage you want[/COLOR]" event="script" value="vip wand.lua">
		<vocation id="1"/>
		<vocation id="2"/>
	</wand>

hope it works for you sorry for not making it more simple but i really dont have much free time.
 
Last edited:
why use talkaction, if u have:


PHP:
<conjure name="holy wand" words="holy wand" lvl="15" mana="120" soul="1" reagentId="id of wand" conjureId="id of conjured wand" conjureCount="1" exhaustion="1000" needlearn="0" event="function" value="conjureItem">
		<vocation id="5"/>
	</conjure>


only need spells.xml


for premmys only add this flag:
PHP:
prem="1"
 
Last edited:
@RichiAdicct
You should add the other elements to your talkaction too.

Also you should use the same storage with different value because you use elseif and if the player has storage 40001 and 40003 fire will "override" the other elements, because it is the first..
 
Back
Top