Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vampire item's
Author Message
an0n!m0use
Journeyman
*

Posts: 56
Likes Given: 16
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #1
Lightbulb Vampire item's
Hi, guys !

Can you help me ... I wanna make some special items for a vampire race ...

1) Vampire Knight Claw && Vampire Claw
Effect: Every third hit is a critical (DMG + Flames Strike)
When a Vampire Knight Claw is charged then change a color (0a4c) and when you click an item - Vampire Knight Claw (charged)

Code:
[ITEMDEF i_vampire_knight_claw]
DEFNAME=i_vampire_knight_claw
NAME=Vampire Knight Claw
...

On=@Create
...

On=@Click
    if (<eval <tag0.argn1> == 1>)
        message @63 <name> (charged)
    else
        message @63 <name>
    endif
    return 1



<--------------------------------- sphere_pvp.scp ------------------------------->
On=@Hit

IF StrMatch("class_vampire_*","<SKILLCLASS>") && ((<argo.BaseID>==i_vampire_claw) || (<argo.BaseID>==i_vampire_knight_claw))
        TAG0.ARGN1 += 1
        IF (<TAG0.ARGN1> >= 2)
            SAY Feel the hell blaze!
            SRC.SPELLEFFECT 51, 100 <UID>
            TAG0.ARGN1 == 0
        ENDIF
    ENDIF


2) Sting of Pain
Effect for [EVENTS e_bleeding_effect]: Hit you an {13-18} hits ... and next your magic spell with chance (50%) - fizzles ....

Code:
[ITEMDEF i_sting_of_pain]
DEFNAME=i_sting_of_pain
NAME=Sting of Pain
ID=03f12
...

On=@Damage
    if rand(100) < 25
        src.sysmessage @38 You fell Bleeding effect
        serv.newitem=i_bleeding_delay
        new.equip=<src.uid>
        src.events=+e_bleeding_effect
    endif

[ITEMDEF i_bleeding_delay]
NAME=Bleeding delay
ID=i_worldgem_bit
Weight=0
Layer=layer_special
Type=t_eq_script

On=@Create
    ATTR=attr_newbie|attr_decay

On=@Equip
    timer={1 3}
    return 1

On=@Timer
    cont.events=-e_bleeding_effect
    remove
    return 1

<--------------------------------- sphere_events.scp ------------------------------->
[EVENTS e_bleeding_effect]
08-04-2013 02:07 AM
Find all posts by this user Like Post Quote this message in a reply
an0n!m0use
Journeyman
*

Posts: 56
Likes Given: 16
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #2
RE: Vampire item's
Guys ? Sad
08-07-2013 01:07 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #3
RE: Vampire item's
Try this
PHP Code:
[EVENTS e_bleeding_effect]
ON=@SpellCast
if <R1,100> <= 50
    src
.actdiff 10000  //set action difficulty to 1000.0 for fizzling the spell,
                       // i don't remember if   the correct value  should be 10000 or -10000.
                     // test it with gm off.
endif
src.events -e_bleeding_effect 

Pay attention to not have overlapping @Spellcast trigger for avoiding conflicts Shock
(This post was last modified: 08-07-2013 02:14 AM by darksun84.)
08-07-2013 02:07 AM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #4
RE: Vampire item's
first one
Code:
[ITEMDEF i_vampire_knight_claw]
name=Vampire Knight Claw
tag.charge=0
...

on=@create
   ...

[events e_player]
on=@Hit
if strmatch("class_vampire_*","<skillclass>") && ((<argo.baseid>==i_vampire_claw) || (<argo.baseid>==i_vampire_knight_claw))
   argo.tag.charge += 1
   if ( <argo.tag.charge> == 2 )
      argo.tag.color=<argo.color>
      argo.color=02a
      argo.tag.name=<argo.name>
      argo.name = <argo.name> (charged)
      argo.update
   elif <argo.tag.charge> > 2
      say Feel the hell blaze!
      src.spelleffect 51,100,<uid>,<argo.uid>
      argo.name=<argo.tag.name>
      argo.color=<argo.tag.color>
      argo.tag.name=
      argo.tag.color=
      argo.tag.charge=0
      argo.update
   endif
endif
08-07-2013 03:25 AM
Find all posts by this user Like Post Quote this message in a reply
an0n!m0use
Journeyman
*

Posts: 56
Likes Given: 16
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 0



Post: #5
RE: Vampire item's
(08-07-2013 02:07 AM)darksun84 Wrote:  Try this
PHP Code:
[EVENTS e_bleeding_effect]
ON=@SpellCast
if <R1,100> <= 50
    src
.actdiff 10000  //set action difficulty to 1000.0 for fizzling the spell,
                       // i don't remember if   the correct value  should be 10000 or -10000.
                     // test it with gm off.
endif
src.events -e_bleeding_effect 

Pay attention to not have overlapping @Spellcast trigger for avoiding conflicts Shock
It's not working. Can you tell me more about this ... how it's working ?

(08-07-2013 03:25 AM)Alaric Wrote:  first one
Code:
[ITEMDEF i_vampire_knight_claw]
name=Vampire Knight Claw
tag.charge=0
...
Thx Veryhappy You saved my life Smile
08-07-2013 08:46 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #6
RE: Vampire item's
try using this, it's a bit more performance optimized
Code:
[ITEMDEF i_vampire_knight_claw]
NAME=Vampire Knight Claw
...

ON=@AfterClick
IF (<TAG0.Charges>)
  LOCAL.ClickMsgText .= " (charged)"
ENDIF

ON=@Damage
TAG0.Charges ++
COLOR=0a4c
IF (<TAG0.Charges>==3)
  SRC.SAY Feel the hell blaze!
  SRC.SPELLEFFECT s_flamestrike 100 <TOPOBJ>
  TAG.Charges=
  COLOR=
ENDIF

Code:
[ITEMDEF i_sting_of_pain]
NAME=Sting of Pain
ID=03f12
...

ON=@Damage
IF (25 > <R100>) && !(<SRC.FINDID.i_bleeding_delay>)
  SRC.SYSMESSAGE @38 You fell Bleeding effect
  SERV.NEWITEM i_bleeding_delay
  NEW.EQUIP <SRC>
ENDIF

[ITEMDEF i_bleeding_delay]
NAME=Bleeding delay
ID=i_memory
TYPE=t_eq_script

ON=@Equip
SRC.EVENTS=+e_bleeding_effect
TIMER={1 3}

ON=@Unequip
SRC.EVENTS=-e_bleeding_effect

ON=@Timer
REMOVE
return 1

[EVENTS e_bleeding_effect]
//I dont understood what you want here, I will assume it has 50% chance to fail the spell
ON=@SpellCast
IF (50 > <R100>)
  ACTDIFF=-1000 //difficulty of the action, 1000 will always succeed and -1000 will always fail
ENDIF
08-09-2013 03:53 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)