The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weap with spelleffect lightning
Author Message
Aeldaven
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Aug 2014
Reputation: 0



Post: #1
Weap with spelleffect lightning
Hello, i try to upgrade this old tus script on sphere 56c.

this is the old script working good on Tus

[6014]
NAME= Gold Halbert of Lightning
//Halberd
//Using Sword type below
ID=143e
TYPE=13
DAM=50-75
HITPOINTS=31-80
SPEED=20
SKILL=Swordsmanship
REQSTR=45
TWOHANDS=Y
BUYVALUE=64-82
SELLVALUE=32-41
MATERIALS=20 ingots
MATERIALS=20
WEIGHT=5
COLOR=05d
ATTR=21
MOREP=0,7,0

ONTRIGGER=DAMAGE
VAR.X=RAND(4)
IF X==1
SOUND=SPELL_LIGHTNING
SRC.SPELLEFFECT 30 550
ENDIF
RETURN 0

CATEGORY=+Helios+ Items
SUBSECTION=Light Weapons
DESCRIPTION=Halbert

_________________________________________________
This is my test with no lightning and no message

[ITEMDEF i_light_Halberd]
ID=i_halberd
DEFNAME=i_light_Halberd
TYPE=t_weapon_sword
DAM=50,75
FLIP=1
SKILL=Swordsmanship
SPEED=20
VALUE=50000
WEIGHT=5.0
TWOHANDS=Y
RESOURCES=20 i_ingot_iron,2 i_board
SKILLMAKE=Blacksmithing 75.0

ON=@Create
HITPOINTS=100
COLOR = 05d
NAME=Halberd of Lightning
ATTR = 21
MOREY = 7

on=@Equip
src.message Il potere del Fulmine scorre nelle tue mani!

on=@Hit
IF (rand(4)) == 1
SRC.SpellEffect=s_lightning,100.0,<uid>
SOUND=snd_SPELL_LIGHTNING
MESSAGE test ok!!!
Return 1
Endif
CATEGORY=+Helios+ Items
SUBSECTION=Armi Light
DESCRIPTION=Halberd
______________________________________________

I need a +7 magic halberd, with lightning cast at 25% random.

Tnx all for reply.
(This post was last modified: 08-27-2014 10:28 AM by Aeldaven.)
08-27-2014 10:17 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Weap with spelleffect lightning
+7 => MOREY=47

ON=@DAMAGE
IF <R4>
SRC.SpellEffect=s_lightning,100.0,<uid>
SRC.SOUND=snd_SPELL_LIGHTNING
MESSAGE test ok!!!
Return 1
Endif

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
08-27-2014 10:42 AM
Find all posts by this user Like Post Quote this message in a reply
Aeldaven
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Aug 2014
Reputation: 0



Post: #3
RE: Weap with spelleffect lightning
on=@Damage
IF !<R4>
SRC.SpellEffect=s_lightning,100.0,<CONT.uid>
SRC.SOUND=snd_SPELL_LIGHTNING
SRC.MESSAGE test ok!!!
Return 1
Endif

This should work.
(This post was last modified: 08-27-2014 12:04 PM by Extreme.)
08-27-2014 11:24 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #4
RE: Weap with spelleffect lightning
@Damage trigger is fired when the weapon RECEIVE damage, which not always happen in the hit proccess, use @Hit.

If you mean the visual effect of the lightning add this line to the trigger: src.effect 1,1
08-27-2014 04:36 PM
Find all posts by this user Like Post Quote this message in a reply
Aeldaven
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Aug 2014
Reputation: 0



Post: #5
RE: Weap with spelleffect lightning
Working now ^_^ ty
Code:
ON=@Damage
    IF !<R3>
        SRC.SpellEffect=s_lightning,100.0,<CONT.uid>
        //SRC.effect 1,1  //uncomment make double lightning effect
        SRC.SOUND=snd_SPELL_LIGHTNING
        //SRC.MESSAGE Test OK! //don't work
        Return 1
    Endif


@XuN
i have try with @hit trig, but not work
Code:
ON=@Hit
    IF !<R3>
        SRC.SpellEffect=s_lightning,100.0,<CONT.uid>
        //SRC.effect 1,1
        SRC.SOUND=snd_SPELL_LIGHTNING
        Return 1
    Endif

Tnx all for helping!!!
08-27-2014 05:21 PM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #6
RE: Weap with spelleffect lightning
(08-27-2014 05:21 PM)Aeldaven Wrote:  Working now ^_^ ty
Code:
ON=@Damage
    IF !<R3>
        SRC.SpellEffect=s_lightning,100.0,<CONT.uid>
        //SRC.effect 1,1  //uncomment make double lightning effect
        SRC.SOUND=snd_SPELL_LIGHTNING
        //SRC.MESSAGE Test OK! //don't work
        Return 1
    Endif


@XuN
i have try with @hit trig, but not work
Code:
ON=@Hit
    IF !<R3>
        SRC.SpellEffect=s_lightning,100.0,<CONT.uid>
        //SRC.effect 1,1
        SRC.SOUND=snd_SPELL_LIGHTNING
        Return 1
    Endif

Tnx all for helping!!!

http://wiki.sphere.torfo.org/index.php/@Hit

This trigger fires when a character hits someone using a combat skill.
So you have to use @hit inside an [EVENTS] and add it to all of your chars.
(This post was last modified: 08-27-2014 05:59 PM by Rizz.)
08-27-2014 05:58 PM
Find all posts by this user Like Post Quote this message in a reply
Aeldaven
Apprentice
*

Posts: 11
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Aug 2014
Reputation: 0



Post: #7
RE: Weap with spelleffect lightning
@Rizz tnx better now.
Code:
[events e_light_weap]
ON=@Hit
    IF !<R3>
        SRC.SpellEffect=s_lightning,100.0,<CONT.uid>
        //SRC.effect 1,1
        SRC.SOUND=snd_SPELL_LIGHTNING
        Return 1
    Endif

[ITEMDEF i_light_Halberd]
ID=i_halberd
DEFNAME=i_light_Halberd
TYPE=t_weapon_sword
DAM=25,50
FLIP=1
SKILL=Swordsmanship
SPEED=25
VALUE=50000
WEIGHT=14.0
TWOHANDS=Y
RESOURCES=20 i_ingot_iron,2 i_board
SKILLMAKE=Blacksmithing 75.0

ON=@Create
   HITPOINTS=100
   COLOR = 05d
   NAME=Halberd of Lightning
   MOREY=60.0
   ATTR=attr_magic
  
ON=@Equip
    src.message Il potere del Fulmine scorre nelle tue mani!
    src.events +e_light_weap
ON=@unequip
    src.events -e_light_weap
      
CATEGORY=+Helios+ Items
SUBSECTION=Armi Light
DESCRIPTION=Halberd

tnx tnx tnx ^_^
08-27-2014 11:31 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Aeldaven's post
Post Reply 


Forum Jump:


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