SphereCommunity
Create another type of arrow - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Create another type of arrow (/Thread-Create-another-type-of-arrow)



Create another type of arrow - victorstelzer - 07-03-2012 10:31 AM

Its someone help me create another type of arrow
Does not work that way here

[ITEMDEF i_arrow_ice]
//Arrow
DEFNAME=i_arrow
NAME=arrow%s
TEVENTS=t_showprops
TYPE=t_weapon_ARROW
FLIP=1
RESOURCES=1 i_arrow_shaft, 1 i_feather
REPLICATE=1
SKILLMAKE=1.0 SKILL_BOWCRAFT
WEIGHT=0.1
CATEGORY=Items by Professions
SUBSECTION=Archers/Bowyers
DESCRIPTION=Arrow
DUPELIST=0f40,0f41,0f42
VALUE=5


RE: Create another type of arrow - Extreme - 07-03-2012 11:06 AM

Troca o 'DEFNAME=i_arrow' por 'ID=i_arrow'


RE: Create another type of arrow - victorstelzer - 07-03-2012 11:19 AM

Como eu faço pra incrementar na flecha um +5 de dano ??


How do I do to improve the arrow a +5 damage?


RE: Create another type of arrow - Skul - 07-03-2012 12:07 PM

TAG.OVERRIDE.ARROWTYPE


RE: Create another type of arrow - RanXerox - 07-03-2012 03:04 PM

If you make a bow that only shoots that sort of arrow, then you can just increase the minimum and maximum DAM amount on the bow...

If you allow a bow to shoot different kinds of arrows, I don't think there is a foolproof way of detecting what sort of arrow a bow just finished shooting. The likely solution requires a combination of triggers being installed on all the players and creatures.


RE: Create another type of arrow - darksun84 - 07-03-2012 05:08 PM

i found this in the revisions :

LOCAL.Arrow storing an UID of used arrow while archery in @Hit.


RE: Create another type of arrow - Skul - 07-04-2012 01:48 AM

also stores in @hittry so you can change the tag.override.arrowtype, right?

My bows are multi-functional to all my different arrows, also by @dclick the arrow you can set it as your main priority.


RE: Create another type of arrow - Anarch Cassius - 07-04-2012 05:31 AM

Yes, Skul has the right idea. You just need to modify all arrows and everything else is fine.

Each arrow type should produce a cursor when double-clicked. The cursor changes the ammo type of the bow, removes old ammo events, and selected adds any needed events.

The basic arrows need to be changed to remove the ammo events only and remove the override tags. Then you can use arrows with all kinds of bows. Just keep the list of possible ammo events updated.


RE: Create another type of arrow - Skul - 07-04-2012 06:52 PM

Yes that was very similar to the idea I had in mind Anarch. I was thinking this can be done in a single player event, and afterwards the scripter can add their own arrows. The code should look something like this:
Code:
on=@itemdclick
if (<act.type>==t_weapon_arrow)
tag.ammotype_arrow=<act.baseid>
sysmessage Arrow Type Changed To: <act.name>
return 1
elseif (<act.type>==t_weapon_bolt)
tag.ammotype_bolt=<act.baseid>
sysmessage Bolt Type Changed To: <act.name>
return 1
endif

on=@hittry
if (<act.type>==t_weapon_bow)
if !(strmatch(<tag0.ammotype_arrow>,0))
  if (<rescount <tag0.ammotype_arrow>>)
   act.tag.override.ammotype=<tag0.ammotype_arrow>
  else
   act.tag.override.ammotype=
  endif
endif
elseif (<act.type>==t_weapon_xbow
if !(strmatch(<tag0.ammotype_bolt>,0))
  if (<rescount <tag0.ammotype_bolt>>)
   act.tag.override.ammotype=<tag0.ammotype_bolt>
  else
   act.tag.override.ammotype=
  endif
endif
endif