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
Targon_ground
Author Message
seafish
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2013
Reputation: 0



Post: #1
Targon_ground
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.
10-26-2013 07:00 AM
Find all posts by this user Like Post Quote this message in a reply
sco
Apprentice
*

Posts: 38
Likes Given: 0
Likes Received: 3 in 1 posts
Joined: Mar 2012
Reputation: 7

Elantharil

Post: #2
RE: Targon_ground
if (<SRC.TARGP.TYPE>=t_grass)
10-26-2013 08:20 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
seafish
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2013
Reputation: 0



Post: #3
RE: Targon_ground
dankishen!
10-26-2013 08:48 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #4
RE: Targon_ground
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
(This post was last modified: 10-26-2013 10:57 AM by RanXerox.)
10-26-2013 09:40 AM
Find all posts by this user Like Post Quote this message in a reply
seafish
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2013
Reputation: 0



Post: #5
RE: Targon_ground
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!
10-26-2013 09:48 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: #6
RE: Targon_ground
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.
(This post was last modified: 10-26-2013 10:40 AM by Alaric.)
10-26-2013 10:39 AM
Find all posts by this user Like Post Quote this message in a reply
seafish
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2013
Reputation: 0



Post: #7
RE: Targon_ground
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.
10-26-2013 08:02 PM
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: #8
RE: Targon_ground
(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
10-26-2013 09:16 PM
Find all posts by this user Like Post Quote this message in a reply
seafish
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Oct 2013
Reputation: 0



Post: #9
RE: Targon_ground
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
10-26-2013 10:58 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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