SphereCommunity
56b - some problems .... - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: 56b - some problems .... (/Thread-56b-some-problems)



56b - some problems .... - an0n!m0use - 02-19-2013 05:22 AM

Hi, I need some help.

1) With MagicReflection: not working Sad

It's from sphere_spells.scp
PHP Code:
[Spell 36]
DEFNAME=s_magic_reflection
NAME
=Magic Reflect
SOUND
=snd_SPELL_MAGIC_REFLECTION
RUNES
=IJS
CAST_TIME
=3.0
RESOURCES
=i_reag_garlic,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM
=i_rune_MAGIC_REFLECTION
SCROLL_ITEM
=i_scroll_MAGIC_REFLECTION
FLAGS
=SPELLFLAG_FX_TARG SPELLFLAG_GOOD SPELLFLAG_TARG_OBJ SPELLFLAG_TARG_CHAR SPELLFLAG_GOOD
EFFECT_ID
=i_fx_BLESS_EFFECT 
EFFECT
=0
DURATION
=3*60.0,4*60.0
MANAUSE
=14
SKILLREQ
=MAGERY 10.0
INTERRUPT
=100.0,100.0 

My Event:
PHP Code:
[EVENTS e_combat]

On=@SpellEffect
if ( <SERV.SPELL(<argn1> ).FLAGS> & SPELLFLAG_HARM )
    if (<
flags>&statf_reflection
    
effect 3,i_fx_glow,1,15,16
    flags 
&= ~statf_reflection
    FINDID
.i_rune_magic_reflection.remove
    
return 1
    
endif
endif 

Where is problem ? ะพ_0


2) I'm find one script: hide helm

PHP Code:
On=@Equip
    src
.findlayer(6).tag0.dispid = <src.findlayer(6).dispid>
    
src.findlayer(6).dispid i_memory
    src
.findlayer(6).color = <src.findlayer(6).color

On=@UnEquip
    src
.findlayer(6).dispid = <src.findlayer(6).tag0.dispid>
    
src.findlayer(6).color = <src.findlayer(6).color>
    
src.findlayer(6).tag0.dispid 

The problem is ... when i change the helmet .... in pack drops this:

[Image: 6bb247567698.jpg]


3) I'm wonna mod. this event ...
PHP Code:
[EVENTS e_no_curse]
On=@Spelleffect
    
if (<argn>=8)
        
effect=3,i_fx_glow,5,15,0
        
return 1
    
else
        return 
0
    
endif 

How make this magic to reflected on enemy ... who attack you ...


RE: 56b - some problems .... - Shaklaban - 02-19-2013 08:18 AM

1. http://forum.spherecommunity.net/Thread-Will-this-work-and-how-to-short-it-down

use my method for magic reflection.

2. give item attr_invis if you want to hide it. if you change its dispid to item which is cannot be equipped it will bounce to the backpack.

3. use src.spelleffeect 8 1000 <uid> but use it cautious because if someone cast it to itself or another character which has that event server can crash you need to consider these situations.


RE: 56b - some problems .... - an0n!m0use - 02-20-2013 08:29 AM

2Shaklaban
Thx Veryhappy

Can you help me with scripts Rolleyes

I very need:
1) With critical damage, enemy has been poisoned and weaken (lost strength at 24-35 points)
( duration of the effect 15 seconds)



2) With critical damage has dismount (from mounts) an enemy, if enemy don't have mounts, just paralyze ...

PHP Code:
On=@Damage
    
if rand(3)=1
    serv
.newitem i_paralyze
    
new.timer 1
    
new.cont=<src.uid>
    
src.sfx snd_spell_paralyze
    Dismount
    
endif

[function 
Dismount]
if (<
src.findlayer.25.uid> )
    
spelleffect 38,1000
    src
.act=<src.findlayer.25.more2>
    
src.act.p=<p>
    
src.findlayer.25.remove
    src
.flags=<src.flags>&~080000000
    
update
    region
.allclients fix
endif 



3) I have a ring, and need this effect: Every third paralyze has no effect on owner of the ring, but paralyzing attacker.

PHP Code:
[EVENTS e_anti_paralyze_reflect
On=@SpellEffect
    
if rand(3)==1
        
if (<argn> == 38) || (<argn> == 47)
            
effect=3,i_fx_glow,5,15,0
            src
.spelleffect 38 1000 <uid>
            return 
1
        
endif
    endif 



RE: 56b - some problems .... - an0n!m0use - 02-25-2013 03:07 AM

Guys ? Sad


RE: 56b - some problems .... - Crusader - 03-13-2013 07:23 AM

well the critical damage cannot be seen, u can just see if u damage is high to certain threshold
so u can do, under ur player event:

1)
ON=@HIT
// [] char doing the hitting
// SRC char hit
IF <ARGN1> >= x //(x is the value u want, high enought to be critical )
SRC.POISON 100.0
SRC.SPELLEFFECT 8,100
ENDIF
RETURN 0

2)
ON=@HIT
// [] char doing the hitting
// SRC char hit
IF <ARGN1> >= x //(x is the value u want, high enought to be critical )
IF (<SRC.FINDLAYER.25>) // layer 25 is for horse
SRC.DISMOUNT
ELSE
SRC.SPELLEFFECT 38,100
ENDIF
ENDIF

3) //I have a ring, and need this effect: Every third paralyze has no effect on owner of the ring, but paralyzing attacker.

ON=@SPELLEFFECT
IF (<EVAL <ARGN1>>==38)
IF !(<TAG0.REFLECTIVERING>)
TAG.REFLECTIVERING = 1
ELSE
IF <TAG0.REFLECTIVERING> > 2
SRC.SPELLEFFECT 38,100
TAG.REFLECTIVERING=
ELSE
TAG.REFLECTIVERING += 1
ENDIF
ENDIF
ENDIF

for the last one i'm not really sure, maybe u have to check a bit...good luck