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-nmm7 (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-nmm7 (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-nmm7 (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
Weapon using mana + magic animation
Author Message
GHelmet
Apprentice
*

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



Post: #3
RE: Weapon using mana + magic animation
Here is what ive tryed to made, i am no programmer so i might have missed something.

ON=@HITTRY
IF (<SRC.MANA> >= 3)
<SRC.MANA> - 3

ELIF (<SRC.MANA> < 3)
SRC.SYSMESSAGE You don't have enought mana.
Return 1

ENDIF

And its not working btw. If you could help me out with a script exemple it would help me out.

Ive changed my script with information i found on another of my question. Here where i am now.


[ITEMDEF i_fire_scepter]
ID=i_scepter
NAME=Fire Scepter
//TYPE=t_weapon_xbow
TYPE=t_weapon_sword
RANGE=1,10
DAM=10
//SKILL=Archery
SKILL=Magie
TWOHANDS=N
WEIGHT=8
SPEED=20
VALUE=190
TAG.REQMANA=3
TAG.OVERRIDE.SOUND_HIT=snd_SPELL_FIREBALL
TAG.OVERRIDE.SOUND_MISS=snd_SPELL_FIREBALL

ON=@Equip
SRC.EVENTS +e_mageweaponmana
ON=@Unequip
SRC.EVENTS -e_mageweaponmana

CATEGORY=Desolation - Test Mages
SUBSECTION=Force
DESCRIPTION=Fire Scepter

ON=@CREATE
HITPOINTS={36 48}



[Events e_mageweaponmana]

ON=@HitTry
//If (<findlayer(2).baseid> == <bowid>)
If !(<MANA> > <REQMANA>)
SysMessage Not enought mana !
Return 1
EndIf
//EndIf

ON=@Hit
If ((<src.flags>&statf_stone) || (<src.region.safe>))
return 1
Else
MANA -=<REQMANA>
EndIf

Where i am now is to make work the REQMANA

And to understand this line : //If (<findlayer(2).baseid> == <bowid>)
(This post was last modified: 03-08-2014 03:57 AM by GHelmet.)
03-08-2014 03:11 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Weapon using mana + magic animation - GHelmet - 03-08-2014 03:11 AM

Forum Jump:


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