SphereCommunity
Ranged Weapon that use Mana as bullet. - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Requests (/Forum-Script-Requests)
+--- Thread: Ranged Weapon that use Mana as bullet. (/Thread-Ranged-Weapon-that-use-Mana-as-bullet)



Ranged Weapon that use Mana as bullet. - GHelmet - 02-27-2014 11:02 AM

Hello, i am searching for a way to make ranged weapon that use mana as bullet. The idea is to remplace mages spell by these ranged weapon in order to balance the fighting of my shard. If anyone know how to script this it would really help me out. Thanks.


RE: Ranged Weapon that use Mana as bullet. - JohnVeritas - 02-27-2014 06:57 PM

TYPE=T_WEAPON_BOW
SKILL=MAGERY

well leave tdata3 empty tdata4 is shoot effect.

give a random event player with equip ( and dont forget to remove that event with unequip ) after that under that event;

Code:
[events blablashooter]
on=@hittry
if (<findlayer(2).baseid> == <bowid>)
if !(<mana> > <reqmanatoshoot>)
sysmessage You don't have mana !
return 1
endif
endif

this is the first check for shoot and then if he got mana and can shoot;

Code:
on=@hit // src <- target // [] <- attacker
if ((<src.flags>&statf_stone) || (<src.region.safe>))
    return 1
else
mana -=<reqmanatoshoot>
endif

Hope its help to you.


RE: Ranged Weapon that use Mana as bullet. - GHelmet - 02-27-2014 09:49 PM

Ill try this tonight, ima let you know if it worked.