SphereCommunity
Targon_ground - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Targon_ground (/Thread-Targon-ground)



Targon_ground - seafish - 10-26-2013 07:00 AM

Hi people!
I would like target with pickaxe for example terrain type t_grass and recieve a message:

Code:
lalalalaa
pickaxe

On=targon_ground
if (<SRC.TARG.TYPE>=t_grass)
src.sysmessage ohoh
endif
return 1

But it doesn't work! Help me please.


RE: Targon_ground - sco - 10-26-2013 08:20 AM

if (<SRC.TARGP.TYPE>=t_grass)


RE: Targon_ground - seafish - 10-26-2013 08:48 AM

dankishen!


RE: Targon_ground - RanXerox - 10-26-2013 09:40 AM

Code:
[ITEMDEF i_shovel_special]
ID=i_shovel
TYPE=t_script
WEIGHT=5
ON=@Create
   COLOR=09a
   HITPOINTS={50 60}
ON=@DClick
   TARGETGW @032 Choose your target
   RETURN 1
ON=@TargOn_Item
   IF (<SRC.TARG.TOPOBJ>!=<SRC.TARG>)
      SRC.SYSMESSAGE @032 You dont need a shovel to dig there...
      RETURN 1
   ENDIF
   IF !(<SRC.TARG.CANSEELOS>)
      SRC.SYSMESSAGE @032 That item is not within line of sight
      RETURN 1
   ELSE
      IF (<SRC.ISGM>)
         SRC.SYSMESSAGE @032 A GM has line of sight to everything... Muhaha!
      ELSE
         SRC.SYSMESSAGE @032 I can see that item
      ENDIF
   ENDIF

   SAY ItemName: <SRC.TARG.NAME>
   SAY Location: <SRC.TARGP>
   SAY TerrainID: <SRC.TARGP.TERRAIN>
   SAY TerrainType: <SRC.TARGP.TYPE>
   IF !(<ISEMPTY <SRC.TARGP.STATICS.0.NAME>>)
      SAY Statics0: <SRC.TARGP.STATICS.0.NAME>
   ENDIF
   SAY Distance: <SRC.TARG.DISTANCE>
   SAY Region: <SRC.TARG.REGION.NAME>
   RETURN 1

ON=@TargOn_Ground
   IF (<SRC.DISTANCE <SRC.TARGP>> > 8)
      SRC.SYSMESSAGE @032 Only Mr Fantastic can reach that far... get closer
      RETURN 1
   ENDIF
   IF !(<SRC.CANSEELOS <SRC.TARGP>>)
      SRC.SYSMESSAGE @032 That location is not within line of sight
      RETURN 1
   ELSE
      IF (<SRC.ISGM>)
         SRC.SYSMESSAGE @032 A GM has line of sight to everything... Muhaha!
      ELSE
         SRC.SYSMESSAGE @032 I can see that location
      ENDIF
   ENDIF

   SRC.SYSMESSAGE Location: X=<SRC.TARGP.X> Y=<SRC.TARGP.Y>
   SRC.SYSMESSAGE TerrainID: <SRC.TARGP.TERRAIN>
   SRC.SYSMESSAGE TerrainType: <SRC.TARGP.TYPE>
   IF !(<ISEMPTY <SRC.TARGP.STATICS.0.NAME>>)
      SAY Statics0: <SRC.TARGP.STATICS.0.NAME>
   ENDIF
   SRC.SYSMESSAGE Distance: <SRC.DISTANCE <SRC.TARGP>>
   SRC.SYSMESSAGE Region: <SRC.TARGP.REGION.NAME>
   RETURN 1



RE: Targon_ground - seafish - 10-26-2013 09:48 AM

ooh thank you, very useful, very rich script!
I dont want to start new topic I have a truble.

Code:
ON=@ItemSpell
IF (<ARGN>==45) // Mark spell
ELIF (<ACT.BaseID>==i_rune_marker)
   ACT.MORE=100

Why my recall rune doesn't set 100 charges? Help me please!


RE: Targon_ground - Alaric - 10-26-2013 10:39 AM

If you use default spell 45 - mark, just change effect=100.
Or use trigger on=@effect.

http://wiki.sphere.torfo.org/index.php/TYPEDEF

+ charges for t_rune represents more1.


RE: Targon_ground - seafish - 10-26-2013 08:02 PM

thanx, but effect=100 doesnt set the charges for rune after Mark spell.
2.
Code:
ELIF (<ACT.BaseID>==i_rune_marker)
   ACT.MORE1=100
the same story. please help me, I need some help.


RE: Targon_ground - XuN - 10-26-2013 09:16 PM

(10-26-2013 08:02 PM)seafish Wrote:  thanx, but effect=100 doesnt set the charges for rune after Mark spell.
2.
Code:
[b]ELIF[/b] (<ACT.BaseID>==i_rune_marker)
   ACT.MORE1=100
the same story. please help me, I need some help.

You need to learn first what is an ELIF for: It represents a condition check for ANYTHING that has not be correct before.

Code:
IF (<ARGN>==45) //If spell is mark
ELIF (<ACT.BaseID>==i_rune_marker) //if spell IS NOT 45 AND act = rune
MORE1=100
endif

Acording to this, if you cast a flamestrike to a rune it will be 'fire charged'? Tongue

This code should do the work:
Code:
IF (<ARGN>==45)
  IF (<ACT.BaseID>==i_rune_marker)
    ACT.MORE1=100
  endif
endif

And this one will make it smaller:

Code:
IF (<ARGN>==45) && (<ACT.BaseID>==i_rune_marker)
  ACT.MORE1=100
endif



RE: Targon_ground - seafish - 10-26-2013 10:58 PM

grasias,

Code:
On=@Itemspell
IF (<ARGN>==45)
  IF (<ACT.BaseID>==i_rune_marker)
    ACT.MORE1=100
  endif
endif

there are 100 charges, but now I can't recall on rune because the spell is fizzle