Weapon problem - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Weapon problem (/Thread-Weapon-problem) |
Weapon problem - Thysis - 05-11-2016 12:54 AM oki have a Big problem i cant set the weapon speed max exemple i want the same speed with 100 dex and 3k2 dex exemple it is possible ?? if yes how ?? here one of my fencing weapon down there the trouble is if i set the speed for a nice speed with 100 dex it ok but if i boost dex to 500 it go lightning speed and i dont want this i want to stay whit the same weapon speed when i got 100 dex [ITEMDEF i_poignard_rouille] DEFNAME=i_poignard_rouille NAME=Poignard rouille ID=i_knife_skinning TYPE=t_weapon_fence SKILL=Fencing REQSTR=0 SPEED=20 WEIGHT=2 TWOHANDS=N DAM={4 12} TAG.OVERRIDE.SPEED 35 TEVENTS=t_speciauxe RESOURCES=1 i_ingot_rusty SKILLMAKE=BLACKSMITHING 0.1, t_weapon_mace_smith ON=@CREATE HITPOINTS=100 COLOR=0aa6 CATEGORY=Armes SUBSECTION=Armes +0 DESCRIPTION=Poignard rouille RE: Weapon problem - Coruja - 05-11-2016 04:56 AM the SPEED value on weapons is not an absolute value, it's just a variable used by the combat swing speed formula, which uses many variables (dex / stam / weapon speed / etc) to calculate the swing speed you can choose between many pre-defined formulas (sphere custom / pre-AOS / AOS / SE / ML) using CombatSpeedEra on sphere.ini, but all these formulas also uses DEX to calculate the speed https://github.com/Sphereserver/Source/blob/master/src/graysvr/CResourceCalc.cpp#L25 if you don't like any of these formulas, you can script your own formula using ARGN1 on @HitTry trigger Code: [EVENTS e_combat] //add this event on all chars RE: Weapon problem - Thysis - 05-27-2016 01:59 AM Code: [EVENTS e_combat] //add this event on all chars ON=@HitTry ARGN1=20 its not on char but on each diffent weapon it is possible to make something close but for weapon ?? exemple fancing weapon hit a this speed sword weapon got this type of speed mace hit at this speed ?? RE: Weapon problem - pointhz - 05-27-2016 07:45 AM [EVENTS e_combat] //add this event on all chars ON=@HitTry IF (<ARGO.BASEID>==i_katana_blackrock) ARGN1=20 ELSEIF (<ARGO.BASEID>==i_katana_gold) ARGN1=10 ENDIF Just change the ID's and the speeds to the ones you want RE: Weapon problem - evening - 08-12-2017 10:53 PM static void SetWeaponTimeout(P_CHAR pc_attacker, P_ITEM pWeapon) { int x,j; if (pWeapon) { if (pWeapon->spd==0) pWeapon->spd=35; x = (15000 / ((pc_attacker->effDex()+100) * pWeapon->spd)*MY_CLOCKS_PER_SEC); //Calculate combat delay } else { if(pc_attacker->skill[WRESTLING]>200) j = 35; else if(pc_attacker->skill[WRESTLING]>400) j = 40; else if(pc_attacker->skill[WRESTLING]>600) j = 45; else if(pc_attacker->skill[WRESTLING]>800) j = 50; else j = 30; x = (15000 / ((pc_attacker->effDex()+100) * j)*MY_CLOCKS_PER_SEC); } pc_attacker->timeout=uiCurrentTime+x; } |