Singed
New Member
- Joined
- Apr 20, 2009
- Messages
- 112
- Solutions
- 1
- Reaction score
- 2
Hey guys i got a problem with one of my scripts. I'm trying to make my weapons switch elements. ex. Fire cranial basher to ice cranial basher and what not. Now the problem is that when i make it it works perfectly.
But if i add an otheer script into the actions xml for dragon slayer to do the same only the one that is at the bottom works. Any idea?
Here are the scripts.
any ideas of why its doing this would be greatly appreciated, and rep will go where it is deserved.
But if i add an otheer script into the actions xml for dragon slayer to do the same only the one that is at the bottom works. Any idea?
Here are the scripts.
PHP:
<!-- multi sword -->
<action itemid="7402" event="script" value="other/apocalypse.lua"/>
<action itemid="7748" event="script" value="other/apocalypse.lua"/>
<action itemid="7858" event="script" value="other/apocalypse.lua"/>
<action itemid="7873" event="script" value="other/apocalypse.lua"/>
<action itemid="7767" event="script" value="other/apocalypse.lua"/>
<!-- multi club -->
<action itemid="7415" event="script" value="other/cranial basher.lua"/>
<action itemid="7756" event="script" value="other/cranial basher.lua"/>
<action itemid="7866" event="script" value="other/cranial basher.lua"/>
<action itemid="7881" event="script" value="other/cranial basher.lua"/>
<action itemid="7775" event="script" value="other/cranial basher.lua"/>
PHP:
CONSTRUCTIONS = {[7402] = 7748, [7748] = 7858, [7858] = 7873, [7873] = 7767, [7767] = 7402}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if CONSTRUCTIONS[item.itemid] ~= nil then
doTransformItem(item.uid, CONSTRUCTIONS[item.itemid])
doSendMagicEffect(fromPosition, CONST_ME_POFF)
else
return FALSE
end
return TRUE
end
PHP:
CONSTRUCTIONS = {[7415] = 7756, [7756] = 7866, [7866] = 7881, [7881] = 7775, [7775] = 7415}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if CONSTRUCTIONS[item.itemid] ~= nil then
doTransformItem(item.uid, CONSTRUCTIONS[item.itemid])
doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_BLUE)
else
return FALSE
end
return TRUE
end
any ideas of why its doing this would be greatly appreciated, and rep will go where it is deserved.