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
Army Job
Author Message
x77x
Master
**

Posts: 488
Likes Given: 0
Likes Received: 15 in 15 posts
Joined: Mar 2012
Reputation: -4



Post: #4
RE: Army Job
with...
Code:
[defname armynames] // using this you can define anything to use in scripts in an easier way
army_01=Wei
army_02=Wu
army_03=Shu
army_04=YS
army_05=LB
army_06=YT
army_07=MH

[events e_army_job]
ON=@Click
// First I should know if TAG.MILITARY and TAG.ARMY are working together, I mean if TAG.MILITARY is ONLY present when someone has a TAG.ARMY, if so use the first if ... use the second if not
//first if
IF ( <SRC.TAG0.MILITARY> && (<TAG.ARMY>==<SRC.TAG.ARMY>) )
//second if
//IF ( (<SRC.TAG0.MILITARY>) && (<TAG.ARMY> && <SRC.TAG.ARMY>) && (<SRC.TAG0.ARMY> != <TAG0.ARMY>) ) //You must check too that they have an army, or the tag.military is only set when tag.army is set too?
    ATTACK
    SAY Die solder of <DEF0.army_<SRC.TAG.ARMY>>
ELSEIF (<SRC.FLAGS>&statf_criminal) || (<SRC.KILLS> >= 3 ) || (<SRC.KARMA> <= -2000 )//ATTACK ALL CRIMINALS, MILITARY AND CIVILIAN
    Say Beat it criminal!
    ATTACK
ELSEIF (<SRC.MEMORYFINDTYPE.0400.LINK>>040004010)//ATTACK every PLAYER made guild
    ATTACK
ENDIF
return 0

i get

Code:
18:33:ERROR:(3kuo_E_ARMYLIFE_NPCS.scp,18)Undefined symbol 'Wei' ['Wei==) )']
18:33:ERROR:(3kuo_E_ARMYLIFE_NPCS.scp,18)Undefined symbol '' [') )']
18:33:ERROR:(3kuo_E_ARMYLIFE_NPCS.scp,18)Undefined symbol 'Wu' ['Wu==) )']
18:33:ERROR:(3kuo_E_ARMYLIFE_NPCS.scp,18)Undefined symbol '' [') )']

did i mention i want NPCs to fight each other too?

okay this seems to be working
I NOW TAGGED NPCS with TAG.MILITARY 1
Code:
[events e_army_job]
ON=@Click//TO INTERACT WITH PLAYERS
IF (<SRC.TAG0.MILITARY>) && !STRMATCH("<SRC.TAG.ARMY>","<TAG.ARMY>")
    ATTACK
    SAY Die solder of <SRC.TAG.ARMY>
ELSEIF (<SRC.FLAGS>&statf_criminal) || (<SRC.KILLS> >= 3 ) || (<SRC.KARMA> <= -2000 )//ATTACK ALL CRIMINALS, MILITARY AND CIVILIAN
    Say Beat it criminal!
    ATTACK
ELSEIF (<SRC.MEMORYFINDTYPE.0400.LINK>>040004010)//ATTACK every PLAYER made guild
    ATTACK
ENDIF
return 0

ON=@NPCLookAtChar//TO INTERACT NPCS
IF (<SRC.TAG0.MILITARY>) && !STRMATCH("<SRC.TAG.ARMY>","<TAG.ARMY>")
    ATTACK
    SAY Die solder of <SRC.TAG.ARMY>
ELSEIF (<SRC.FLAGS>&statf_criminal) || (<SRC.KILLS> >= 3 ) || (<SRC.KARMA> <= -2000 )//ATTACK ALL CRIMINALS, MILITARY AND CIVILIAN
    Say Beat it criminal!
    ATTACK
ELSEIF (<SRC.MEMORYFINDTYPE.0400.LINK>>040004010)//ATTACK every PLAYER made guild
    ATTACK
ENDIF
return 0

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 10-25-2015 09:06 AM by x77x.)
10-25-2015 08:34 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Army Job - x77x - 10-25-2015, 03:13 AM
RE: Army Job - XuN - 10-25-2015, 05:24 AM
RE: Army Job - x77x - 10-25-2015, 05:59 AM
RE: Army Job - x77x - 10-25-2015 08:34 AM
RE: Army Job - XuN - 10-26-2015, 05:01 AM

Forum Jump:


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