SphereCommunity
Any questions/problems - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Any questions/problems (/Thread-Any-questions-problems)



Any questions/problems - Awaken - 09-27-2013 05:24 AM

1 - How do if you are statf_freeze and @gethit damage, the flag freeze donĀ“t remove. I try to script a Paralyzing Blow

2 - Any trigger when player move. Example: When player move his char 1 tile. Any trigger for this?

3 - the leather armor need a boots to give the full Armor of this leather armor. How change this?, no need boots for leather armor for give the correct AR to player.


Thanks


RE: Any questions/problems - RanXerox - 09-27-2013 05:48 AM

Here is one idea for Paralyzing blow:

Code:
[ITEMDEF i_parablow_timer]
ID=01d8c
NAME=paralyzing blow timer
TYPE=t_eq_script
LAYER=30
WEIGHT=0
ON=@Create
   ATTR=attr_decay|attr_can_decay
ON=@Equip
   ATTR=attr_decay|attr_can_decay
   IF (<CONT.NPC>)
      MORE1=6 //NPCs are paralyzed for 6 seconds
   ELSE
      MORE1=3 //Palyers paralyzed for 3 seconds
   ENDIF
   CONT.EMOTE get paralyzed by the last attack
   TIMER=1
ON=@Timer
   IF (<MORE1>) && !(<CONT.FLAGS> & statf_dead)
      CONT.ACTION = -1 //stop all actions
      CONT.FLAGS |= statf_freeze //freeze the player/NPC
      MORE1 -= 1 //decrement a counter
      TIMER=1 //reset the timer
      RETURN 1
   ELSE
      CONT.FLAGS &= ~statf_freeze //remove the freeze flag
      REMOVE //remove this paralyzing blow memory
   ENDIF

2. The Trigger is @Step

3. Need a better explanation of what you want


RE: Any questions/problems - Awaken - 09-27-2013 05:56 AM

Thanks for all.
Edit:
1 - The problem in this Paralyzed blow if the timer... if you harm the freeze remove and renew when the timer is 0, no instant. :/
3 - If you equip a full leather armor (cap, gorget, gloves, sleeves, tunic and leggings). The leather armor is 15 (example). When equip de armor, in the character the real armor is 13 o 14, less than the real leather armor.

More questions.
4 - How do a custom trigger? Any example?

Thanks for all


RE: Any questions/problems - sco - 09-27-2013 08:40 AM

@1.: add this event to the paralyzed char:
Code:
[events e_no_unpara]
on=@gethit
argn2 |= dam_nounparalyze



RE: Any questions/problems - Rattlehead - 09-27-2013 12:27 PM

correct me if i am wrong, but isnt the armor calculated from the average of the individual part? what i mean, is the gorget prolly has a lower ar than the chest does, not all pieces have an equal amount to others, so if ur chest piece is 12, but ur gorget is 6, then the ending ar would not be 12.


RE: Any questions/problems - sco - 09-27-2013 04:32 PM

Probably it's because of the shoes. Shoes make up 5% of your AR. Script shoes with 15 AR and equip them, that might correct it.


RE: Any questions/problems - darksun84 - 09-27-2013 11:40 PM

A custom trigger example :

PHP Code:
[FUNCTION testTrigger]
//There are also TAT_AS_ARGS for string and TAT_AS_ARGO for object
//They are flags so they can be "combined"
local.sum=<TRIGGER @Custom,<def.TAT_AS_ARGN>,1,2>
serv.log <dlocal.sum

//You have to install this event for triggering @Custom
[EVENTS customTrigger]

ON=@Custom
return <argn1>+<argn2>   //argn1 is 1 , argn2 is 2 , return 3 . Trigger can return only numbers. 



RE: Any questions/problems - Extreme - 09-28-2013 01:38 AM

(09-27-2013 11:40 PM)darksun84 Wrote:  A custom trigger example :

PHP Code:
[FUNCTION testTrigger]
//There are also TAT_AS_ARGS for string and TAT_AS_ARGO for object
//They are flags so they can be "combined"
local.sum=<TRIGGER @Custom,<def.TAT_AS_ARGN>,1,2>
serv.log <dlocal.sum

//You have to install this event for triggering @Custom
[EVENTS customTrigger]

ON=@Custom
return <argn1>+<argn2>   //argn1 is 1 , argn2 is 2 , return 3 . Trigger can return only numbers. 
Cool drk!


RE: Any questions/problems - Awaken - 09-30-2013 03:34 AM

Oh, thanks all! Big Grin
More Questions!

5 - i need create a meditation skill like RunUO. You are stay in the position if you move you cancel meditation state. Confused When trigger @step and action=meditation?

6 - How changes the % of armor give. Example: If you equip a platemail armor, it give a 50% of armor. Make custom % of armor give.

Thanks all!