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
Need help in general Scripting
Author Message
Fronz
Apprentice
*

Posts: 36
Likes Given: 2
Likes Received: 0 in 0 posts
Joined: Apr 2016
Reputation: 0



Post: #43
RE: Need help in general Scripting
Is it something wrong with this script? Every things works fine as it should. But some mobs don't attack me. Like I can attack them but they won't attack me.

[REGIONTYPE r_newbiedungeon]
ON=@ENTER
SRC.EVENTS=+e_dungeonnewbie
SRC.EVENTS=+e_dungeonnewbie2
ON=@EXIT
SRC.EVENTS=-e_dungeonnewbie
SRC.EVENTS=-e_dungeonnewbie2

[EVENTS e_dungeonnewbie]
On=@hittry
if (<src.isplayer>)
sysmessage You can't attack other players in this dungeon.
return 1
endif

[EVENTS e_dungeonnewbie2]
ON=@SpellEffect
if ( <ISPLAYER> && <SRC.ISPLAYER> )
f_spell_is_aggressive <ARGN>
IF (<VAR0.f_spell_is_aggressive> = 1)
SRC.SYSMESSAGE You cannot harm players in this dungeon.
RETURN 1
ENDIF
ENDIF

ON=@SpellCast
If ( <Argn> == 33 )
src.message " You can't use that spell in this dungeon"
return 1
Endif
If ( <Argn> == 40 )
src.message " You can't use that spell in this dungeon"
return 1
Endif
If ( <Argn> == 58 )
src.message " You can't use that spell in this dungeon"
return 1
Endif
If ( <Argn> == 60 )
src.message " You can't use that spell in this dungeon"
return 1
Endif
If ( <Argn> == 61 )
src.message " You can't use that spell in this dungeon"
return 1
Endif
If ( <Argn> == 62 )
src.message " You can't use that spell in this dungeon"
return 1
Endif
If ( <Argn> == 63 )
src.message " You can't use that spell in this dungeon"
return 1
Endif
If ( <Argn> == 64 )
src.message " You can't use that spell in this dungeon"
return 1
endif



[FUNCTION f_spell_is_aggressive]
VAR.f_spell_is_aggressive = 1
VAR.is_dispel = 0
if ( 0 )
elseif ( <argn> == 1 ) // clumsy
elseif ( <argn> == 3 ) // feeblemind
elseif ( <argn> == 5 ) // magic arrow
elseif ( <argn> == 8 ) // weaken
elseif ( <argn> == 12 ) // harm
elseif ( <argn> == 18 ) // fireball
elseif ( <argn> == 20 ) // poison
elseif ( <argn> == 27 ) // curse
elseif ( <argn> == 28 ) // - Fire Field
elseif ( <argn> == 30 ) // lightning
elseif ( <argn> == 31 ) // mana drain
elseif ( <argn> == 33 ) // - Blade of Spirits
elseif ( <argn> == 37 ) // mind blast
elseif ( <argn> == 38 ) // paralyze
elseif ( <argn> == 39 ) // - Poison Field
elseif ( <argn> == 40 ) // - Summon Creature
elseif ( <argn> == 41 ) // dispel
VAR.is_dispel = 1
elseif ( <argn> == 42 ) // energy bolt
elseif ( <argn> == 43 ) // explosion
elseif ( <argn> == 46 ) // mass curse
elseif ( <argn> == 47 ) // paralyze field
elseif ( <argn> == 49 ) // chain lightning
elseif ( <argn> == 51 ) // flamestrike
elseif ( <argn> == 53 ) // mana vampire
elseif ( <argn> == 54 ) // mass dispel
VAR.is_dispel = 1
elseif ( <argn> == 55 ) // meteor swarm
elseif ( <argn> == 57 ) // - Earthquake
elseif ( <argn> == 58 ) // - Energy Vortex
elseif ( <argn> == 60 ) // - Air Elemental
elseif ( <argn> == 61 ) // - Summon Daemon
elseif ( <argn> == 62 ) // - Earth Elemental
elseif ( <argn> == 63 ) // - Fire Elemental
elseif ( <argn> == 64 ) // - Water Elemental
else
VAR.f_spell_is_aggressive = 0
endif


I'm pretty sure it's something I did with the event in Bold.

Sorry for bothering once again,
Fronz
(This post was last modified: 05-04-2016 11:31 AM by Fronz.)
05-04-2016 10:04 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Need help in general Scripting - Fronz - 04-21-2016, 10:24 AM
RE: Need help in general Scripting - Fronz - 04-23-2016, 12:03 AM
RE: Need help in general Scripting - Fronz - 04-23-2016, 11:41 PM
RE: Need help in general Scripting - Fronz - 04-24-2016, 03:21 AM
RE: Need help in general Scripting - Fronz - 04-24-2016, 09:25 AM
RE: Need help in general Scripting - Fronz - 04-25-2016, 02:10 AM
Need help in general Scripting - roberpot - 04-25-2016, 03:26 PM
Need help in general Scripting - roberpot - 04-26-2016, 12:00 AM
Need help in general Scripting - roberpot - 04-26-2016, 02:57 AM
Need help in general Scripting - roberpot - 04-26-2016, 02:57 PM
Need help in general Scripting - roberpot - 04-26-2016, 10:31 PM
Need help in general Scripting - roberpot - 04-26-2016, 11:23 PM
Need help in general Scripting - roberpot - 04-26-2016, 11:29 PM
Need help in general Scripting - roberpot - 04-27-2016, 02:50 AM
RE: Need help in general Scripting - Fronz - 04-27-2016, 04:32 AM
Need help in general Scripting - roberpot - 04-27-2016, 04:59 AM
Need help in general Scripting - roberpot - 04-27-2016, 08:37 AM
RE: Need help in general Scripting - Fronz - 04-27-2016, 12:58 PM
RE: Need help in general Scripting - XuN - 04-27-2016, 04:07 PM
RE: Need help in general Scripting - Fronz - 04-28-2016, 06:32 AM
RE: Need help in general Scripting - Fronz - 05-01-2016, 11:46 AM
RE: Need help in general Scripting - Fronz - 05-02-2016, 12:53 AM
RE: Need help in general Scripting - XuN - 05-02-2016, 06:48 PM
RE: Need help in general Scripting - Fronz - 05-03-2016, 12:10 AM
RE: Need help in general Scripting - XuN - 05-03-2016, 01:09 AM
RE: Need help in general Scripting - Fronz - 05-03-2016, 01:40 AM
RE: Need help in general Scripting - Fronz - 05-04-2016 10:04 AM
RE: Need help in general Scripting - XuN - 05-04-2016, 04:29 PM
RE: Need help in general Scripting - Fronz - 05-10-2016, 01:05 PM
RE: Need help in general Scripting - Fronz - 05-16-2016, 10:25 AM
RE: Need help in general Scripting - Fronz - 05-17-2016, 02:34 AM
RE: Need help in general Scripting - Fronz - 05-28-2016, 09:27 PM

Forum Jump:


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