Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shield of Flame Strike
Author Message
an0n!m0use
Journeyman
*

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



Post: #1
Question Shield of Flame Strike
This shield is protect you from flame strike ... When it is charged ...
But a have one problem ... When the charges is ended, it still protect you Sad

PHP Code:
[ITEMDEF i_shield_of_flame]
DEFNAME=i_shield_of_flame
NAME
=Shield of Flame Protector
ID
=i_shield_kite_metal
TYPE
=t_shield
ARMOR
=60

On
=@Create
    HITPOINTS
=-1
    COLOR
=0446
    MOREY
=1

On
=@Click
    message 
@63 <name>
    
message (Charges: <morey>)
    return 
1

On
=@Equip
    
if (<morey> < 1)
       
src.events -e_shield_of_flame
       removefromview
       remove
       
return 1
    
else
       
src.events +e_shield_of_flame
    
endif
    
On=@UnEquip
    src
.events -e_shield_of_flame

CATEGORY
=Races 
SUBSECTIOn
=Races Items
DESCRIPTIOn
=Shield of Flame Protector 

PHP Code:
[EVENTS e_shield_of_flame]    
On=@Spelleffect
    
if (<argn>==51) && (<FINDLAYER.2.BaseID>==i_shield_of_flame)
        
FINDLAYER.2.morey -= 1
        effect
=3,i_fx_glow,5,15,0
        
return 1
    
endif 
07-20-2013 01:26 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: #2
RE: Shield of Flame Strike
The problem is when morey becomes 0, the protection continue to work because the item is still equipped.

So you can add another condition to the spelleffect if
PHP Code:
if (<argn>==51) && (<FINDLAYER.2.BaseID>==i_shield_of_flame) && (<FINDLAYER.2.morey> > 0)
        
FINDLAYER.2.morey -= 1
        effect
=3,i_fx_glow,5,15,0
        
return 1
endif 
(This post was last modified: 07-20-2013 02:55 AM by darksun84.)
07-20-2013 02:54 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: #3
Question RE: Shield of Flame Strike
(07-20-2013 02:54 AM)darksun84 Wrote:  The problem is when morey becomes 0, the protection continue to work because the item is still equipped.
Thx Veryhappy


Can you help me with this recharging bottle ... For Flame Strike shield ...
PHP Code:
[ITEMDEF i_recharging_potion]
Name=Recharging Potion
ID
=i_bottle_3
WEIGHT
=1

On
=@Create
    COLOR
=00
    MOREY
=10

On
=@Click
    message 
@63 <name>
    
message (Charges: <morey>)
    return 
1
    
On
=@DClick
    
if <topobj> != <src>
        
src.sysmessage You can't reach that
        return 1
    endif
        target What item do you want to recharge?
        return 1
    
On=@Targon_item
    if <argo.topobj> != <src>
        src.sysmessage You can'
t reach that
    elif 
<argo.topobj> != (<argo.BaseID>==i_shield_of_flame)
        
src.sysmessage You can't reach that
    else
        argo.morey += 10
    endif
    return 1

On=@Targon_char
    src.sysmessage You can'
t reach that
    
return 1
    
On
=@Targon_ground
    src
.sysmessage You can't reach that
    return 1 
(This post was last modified: 07-21-2013 10:12 AM by an0n!m0use.)
07-20-2013 09:31 PM
Find all posts by this user Like Post Quote this message in a reply
xwerswoodx
Journeyman
*

Posts: 86
Likes Given: 4
Likes Received: 7 in 4 posts
Joined: Jun 2012
Reputation: 0

UoMMO

Post: #4
RE: Shield of Flame Strike
ADD sphere_defs at [DEFNAME can_i_flags]
Code:
CAN_I_RECHARGE         020000    //Recharged items

And after add your items which is like i_shield_of_flame
Code:
CAN=CAN_I_RECHARGE

If you write CAN=CAN_I_RECHARGE on any items the potion which I will write, can recharge your item.

For example;
Code:
[Itemdef i_shield_asd]
ID=blabla
NAME=Asd Shield
CAN=CAN_I_RECHARGE
...

SO you will not check every item with if.

Code:
[ITEMDEF i_recharging_potion]
Name=Recharging Potion
ID=i_bottle_3
WEIGHT=1

On=@Create
MOREY=10

On=@Click
message @63 <name>
message (Charges: <dmorey>)

On=@Dclick
IF !(<TOPOBJ> == <SRC>)
src.sysmessage You can't reach that.
ELSE
TARGET What item do you want to recharge?
ENDIF
RETURN 1

ON=@TARGON_ITEM
REF1=<SRC.TARG>
IF !(<REF1.TOPOBJ> == <SRC>)
src.sysmessage You can't reach that.
ELIF !(<REF1.CAN>&CAN_I_RECHARGE)
src.sysmessage This can't be recharged!
ELSE
REF1.MOREY +=<dmorey>
ENDIF
RETURN 1

On=@TARGON_CHAR
src.sysmessage Are you joking with me?
return 1

On=@TARGON_GROUND
src.sysmessage Really! Do you want to waste it?
return 1
(This post was last modified: 07-21-2013 03:00 PM by xwerswoodx.)
07-21-2013 02:55 PM
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: Shield of Flame Strike
(07-21-2013 02:55 PM)xwerswoodx Wrote:  ...
Thx you very much Veryhappy
07-22-2013 07:43 AM
Find all posts by this user Like Post Quote this message in a reply
xwerswoodx
Journeyman
*

Posts: 86
Likes Given: 4
Likes Received: 7 in 4 posts
Joined: Jun 2012
Reputation: 0

UoMMO

Post: #6
RE: Shield of Flame Strike
(07-22-2013 07:43 AM)an0n!m0use Wrote:  
(07-21-2013 02:55 PM)xwerswoodx Wrote:  ...
Thx you very much Veryhappy

You are wellcome but I can do something for you.

If you use typedef you can do your recharging potion or deed like this.
Code:
[ITEMDEF i_recharging_potion]
Name=Recharging Potion
ID=i_bottle_3
WEIGHT=1
Type=t_recharge

CATEGORY=Races
SUBSECTIOn=Races Items
DESCRIPTIOn=Recharging Potion

On=@Create
MOREX=10

[Itemdef i_recharging_deed]
Name=Recharging Deed
ID=i_deed
Weight=1
Type=t_recharge

CATEGORY=Races
SUBSECTIOn=Races Items
DESCRIPTIOn=Recharging Deed

On=@Create
MOREX=20 //MoreX is the amount of charge which will be added to item's moreX!

Is that easy for you? (:

Code:
[Typedef t_recharge]
On=@Click
message @63 <name>
message (Charges: <dmorex>)

On=@Dclick
IF !(<TOPOBJ> == <SRC>)
src.sysmessage You can't reach that.
ELSE
TARGET What item do you want to recharge?
ENDIF
RETURN 1

ON=@TARGON_ITEM
REF1=<SRC.TARG>
IF !(<REF1.TOPOBJ> == <SRC>)
src.sysmessage You can't reach that.
ELIF !(<REF1.CAN>&CAN_I_RECHARGE)
src.sysmessage This can't be recharged!
ELIF !(<dMOREX>)
src.sysmessage This item don't have charge.
ELSE
REF1.MOREX +=<dmorex>
MOREX=0 //If you want to remove you don't need this.
//REMOVE //Do you want to remove after charge?
ENDIF
RETURN 1

On=@TARGON_CHAR
src.sysmessage Are you joking with me?
return 1

On=@TARGON_GROUND
src.sysmessage Really! Do you want to waste it?
return 1

BUT note that: In that case the weapons use MOREY for DAMAGE for magical weapons. So I fix your items with "moreX"

Code:
[ITEMDEF i_shield_of_flame]
NAME=Shield of Flame Protector
ID=i_shield_kite_metal
TYPE=t_shield
ARMOR=60
CAN=CAN_I_RECHARGE

On=@Create
HITPOINTS=-1
COLOR=0446
MOREX=1

On=@Click
message @63 <name>
message (Charges: <DMOREX>)
return 1

On=@EquipTest //@Equiptest is more good than @Equip
if (<dMOREX> < 1)
src.events -e_shield_of_flame
removefromview
remove
return 1
else
src.events +e_shield_of_flame
endif
    
On=@UnEquip
src.events -e_shield_of_flame

CATEGORY=Races
SUBSECTIOn=Races Items
DESCRIPTIOn=Shield of Flame Protector
(This post was last modified: 07-22-2013 10:38 PM by xwerswoodx.)
07-22-2013 10:29 PM
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: #7
RE: Shield of Flame Strike
(07-22-2013 10:29 PM)xwerswoodx Wrote:  Is that easy for you? (:
Yep Smile It works how i want Wink
07-22-2013 11:43 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)