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
LOS attack?
Author Message
x77x
Master
**

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



Post: #1
LOS attack?
how can i get these guys to actually attack players passing by?

[Image: ambush.jpg]

also
how can i get the fire soldiers to attack with fire? they arent using the invis spellbook i gave them!

what would be amazing is throw torches and when they hit the ground, fire field goes off =)

how can i get them to throw rocks like ogres do?

Code:
[CHARDEF c_wei_infantry_ambush_f]
ID=c_man
NAME=Soldier [Wei]
CAN=MT_WALK|MT_RUN|MT_USEHANDS|MT_EQUIP|MT_MOUNT
//DAM=
//ARMOR=
DESIRES=r_civilization,t_coin,t_gold,t_gem,t_potion
AVERSIONS=t_trap,e_carnivores3
FOODTYPE=t_food,t_drink,t_fruit,t_grain
//MAXFOOD=20
RESOURCES=i_flesh_head_2, i_flesh_torso, i_flesh_right_arm, i_flesh_left_arm, i_flesh_left_leg, i_flesh_right_leg
BLOODCOLOR=colors_blood
MOVERATE=190
TSPEECH=spk_human_prime
TSPEECH=spk_human_default
TSPEECH=s_army_commands
TEVENTS=e_Human_HearUnk
TEVENTS=e_army_soldier
CATEGORY=3KUO
SUBSECTION=Soldiers - Wei
DESCRIPTION=Infantry (ambush fire)
ON=@Create
TAG.MILITARY 1
LEVEL={1 14}
TAG.ARMY Wei
TAG.ARMYNUMBER=040004000
TAG.NAME.HUE color_wei
   TITLE=Ambush
   NPC=brain_human
   //NPC=brain_monster
   COLOR=colors_skin
   STR={75 100}
   DEX={45 55}
   INT=100
   MAXHITS=100
   MAXSTAM=100
   MAXMANA=500
   FAME=1000
   MAGERY=100.0
   PARRYING={50.0 75.0}
   TACTICS={50.0 75.0}
   WRESTLING={60.0 70.0}
   HIDING=200.0
   STEALTH=200.0
//
   ITEMNEWBIE=random_male_hair
   COLOR=colors_hair
   ITEMNEWBIE=random_facial_hair,1,R5
   COLOR=match_hair
   ITEMNEWBIE=i_military_cap
   ITEMNEWBIE=i_military_leggings
   ITEMNEWBIE=i_military_tunic
   ITEMNEWBIE=i_military_overplate
   ITEMNEWBIE=i_military_boots
   ITEMNEWBIE=i_military_apron
   COLOR=color_wei
   ITEMNEWBIE=i_military_uniform
   COLOR=color_wei
//
   ITEMNEWBIE=i_military_mempo
//
   ITEMNEWBIE=i_spellbook
   MORE1=08000000//FF
   MORE2=00
//
ON=@NPCRestock
   ITEM=random_coin_purse
   ITEM=i_torch

[CHARDEF c_wei_infantry_ambush_a]
ID=c_man
NAME=Soldier [Wei]
CAN=MT_WALK|MT_RUN|MT_USEHANDS|MT_EQUIP|MT_MOUNT
//DAM=
//ARMOR=
DESIRES=r_civilization,t_coin,t_gold,t_gem,t_potion
AVERSIONS=t_trap,e_carnivores3
FOODTYPE=t_food,t_drink,t_fruit,t_grain
//MAXFOOD=20
RESOURCES=i_flesh_head_2, i_flesh_torso, i_flesh_right_arm, i_flesh_left_arm, i_flesh_left_leg, i_flesh_right_leg
BLOODCOLOR=colors_blood
MOVERATE=190
TSPEECH=spk_human_prime
TSPEECH=spk_human_default
TSPEECH=s_army_commands
TEVENTS=e_Human_HearUnk
TEVENTS=e_army_soldier
CATEGORY=3KUO
SUBSECTION=Soldiers - Wei
DESCRIPTION=Infantry (ambush archer)
ON=@Create
TAG.MILITARY 1
LEVEL={1 14}
TAG.ARMY Wei
TAG.ARMYNUMBER=040004000
TAG.NAME.HUE color_wei
   TITLE=Ambush
   NPC=brain_human
   COLOR=colors_skin
   STR={75 100}
   DEX={45 55}
   INT=100
   MAXHITS 100
   MAXSTAM 100
   MAXMANA 100
   FAME=1000
   ANATOMY={50.0 75.0}
   HEALING={50.0 75.0}
   MAGICRESISTANCE={20.0 30.0}
   PARRYING={50.0 75.0}
   ARCHERY={80.0 100.0}
   TACTICS={50.0 75.0}
   WRESTLING={20.0 30.0}
   HIDING=200.0
   STEALTH=200.0
//
   ITEMNEWBIE=random_male_hair
   COLOR=colors_hair
   ITEMNEWBIE=random_facial_hair,1,R5
   COLOR=match_hair
   ITEMNEWBIE=i_military_cap
   ITEMNEWBIE=i_military_leggings
   ITEMNEWBIE=i_military_tunic
   ITEMNEWBIE=i_military_overplate
   ITEMNEWBIE=i_military_boots
   ITEMNEWBIE=i_military_apron
   COLOR=color_wei
   ITEMNEWBIE=i_military_uniform
   COLOR=color_wei
//
   ITEMNEWBIE=i_military_mempo
//
   ITEMNEWBIE=i_military_quiver
   ITEM=i_arrow,{20 40}
//
ON=@NPCRestock
   ITEM=random_coin_purse
   ITEM=i_bow

Code:
[events e_army_soldier]
ON=@NPCLookAtChar//TO INTERACT WITH NPCS
IF (<SRC.TAG0.MILITARY>)
    IF !(<SRC.TAG0.ARMYNUMBER>==<TAG0.ARMYNUMBER>)
    ATTACK <SRC>
    ELIF (<SRC.FLAGS>&statf_criminal) || (<SRC.KILLS> >= 3 ) || (<SRC.KARMA> <= -2000 )//ATTACK MILITARY CRIMINALS
    Say Beat it military criminal!
    ATTACK <SRC>
    ELIF (<SRC.MEMORYFINDTYPE.0400.LINK> > 040004010)//ATTACK every PLAYER made guild
    ATTACK <SRC>
    ENDIF
ELSEIF (<SRC.FLAGS>&statf_criminal) || (<SRC.KILLS> >= 3 ) || (<SRC.KARMA> <= -2000 )//ATTACK CIVILIAN CRIMINALS
    Say Beat it civilian criminal!
    ATTACK <SRC>
ENDIF

ON=@NotoSend//2 ALLY 5 ENEMY 6 RED    
IF (<SRC.TAG0.MILITARY>)
    IF !(<SRC.TAG0.ARMYNUMBER>==<TAG0.ARMYNUMBER>)
    //IF !<GUILD>
    ARGN1=5
    ELIF (<SRC.TAG0.ARMYNUMBER>==<TAG0.ARMYNUMBER>)
    //ELIF <GUILD>
    ARGN1=2
    ENDIF
ENDIF

ON=@GetHit
IF (<SRC.TAG0.MILITARY>)
    IF (<SRC.TAG0.ARMYNUMBER>==<TAG0.ARMYNUMBER>)
    src.criminal 1
    ENDIF
ENDIF

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 10-08-2016 06:48 AM by x77x.)
10-08-2016 06:37 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

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



Post: #2
RE: LOS attack?
no ideas?

ON=@click or something ???

Dragons of Time 2000-2020
http://dragonsoftime.com
10-20-2016 11:02 PM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #3
RE: LOS attack?
10-21-2016 04:53 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

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



Post: #4
RE: LOS attack?
tried it
npcseenewplayer doesnt work

Code:
[events e_ambush]
//ON=@NPCSeeNewPlayer//TO INTERACT WITH PLAYERS
ON=@click//TO INTERACT WITH PLAYERS
IF (<SRC.TAG0.MILITARY>)
    IF !(<SRC.TAG0.ARMYNUMBER>==<TAG0.ARMYNUMBER>)
    ATTACK <SRC>
    ELIF (<SRC.FLAGS>&statf_criminal) || (<SRC.KILLS> >= 3 ) || (<SRC.KARMA> <= -2000 )//ATTACK MILITARY CRIMINALS
    Say Beat it military criminal!
    ATTACK <SRC>
    ELIF (<SRC.MEMORYFINDTYPE.0400.LINK> > 040004010)//ATTACK every PLAYER made guild
    ATTACK <SRC>
    ENDIF
ELSEIF (<SRC.FLAGS>&statf_criminal) || (<SRC.KILLS> >= 3 ) || (<SRC.KARMA> <= -2000 )//ATTACK CIVILIAN CRIMINALS
    Say Beat it civilian criminal!
    ATTACK <SRC>
ENDIF

i dont think click worked either...

hmmm

ground trigger or something?

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 10-21-2016 09:57 PM by x77x.)
10-21-2016 10:30 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #5
RE: LOS attack?
Every char (player/NPC) check LOS before start many actions, on players you can use GM=1 to skip these checks but on NPCs there's no way to skip it

maybe if you add some specific flags on the char (statf_insubstantial or statf_hovering) it can help, but I think it's not enough to fully skip LOS checks

so I think the best workaround in this case is just move the NPC to the road but set Z+40 on NPC to make it "fly" over the mountain
10-30-2016 03:21 AM
Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

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



Post: #6
RE: LOS attack?
so its not possible, =(

how can you keep them hidden, stop them from walking around? they just walk around and unhide then hide
also
how can i get the fire soldiers to attack with fire? they arent using the invis spellbook i gave them!
what would be amazing is throw torches and when they hit the ground, fire field goes off =)
and/or
how can i get them to throw rocks like ogres do?

what about something like...

Code:
ON=@Create
SRC.FLAGS |= statf_freeze

Code:
[events e_ambush]
ON=@NPCSeeNewPlayer//TO INTERACT WITH PLAYERS
//ON=@click//TO INTERACT WITH PLAYERS
IF (<SRC.TAG0.MILITARY>)
    IF !(<SRC.TAG0.ARMYNUMBER>==<TAG0.ARMYNUMBER>)
    ATTACK <SRC>
    ELIF (<SRC.FLAGS>&statf_criminal) || (<SRC.KILLS> >= 3 ) || (<SRC.KARMA> <= -2000 )//ATTACK MILITARY CRIMINALS
    Say Beat it military criminal!
    ATTACK <SRC>
    ELIF (<SRC.MEMORYFINDTYPE.0400.LINK> > 040004010)//ATTACK every PLAYER made guild
    ATTACK <SRC>
    ENDIF
ELSEIF (<SRC.FLAGS>&statf_criminal) || (<SRC.KILLS> >= 3 ) || (<SRC.KARMA> <= -2000 )//ATTACK CIVILIAN CRIMINALS
    Say Beat it civilian criminal!
    ATTACK <SRC>
ENDIF

ON=@CombatStart
FLAGS & =~ statf_freeze

ON=@CombatEnd
FLAGS |= statf_freeze

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 10-30-2016 06:41 AM by x77x.)
10-30-2016 06:15 AM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #7
RE: LOS attack?
You can set THROWOBJ in the char definition to an ID of an item you wish the char to throw. You can also set THROWRANGE and THROWDAM. It's in the wiki btw ;-)

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
11-01-2016 07:39 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
x77x
Master
**

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



Post: #8
RE: LOS attack?
awesome... BUT
on=@create
THROWOBJ=i_torch_lit
THROWDAM=5,10
THROWRANGE=5

they dont throw shit... tried it above on=@create and same

any idea about the other stuff?
(use the invis spellbooks i gave them? stay hidden until they attack? then go back to hiding when are done? )

and the other thing you were supposed to check 3 weeks ago? =)

oh hey, theres a nice bug...
as your running away from an enemy you can tab out of warmode and click the hide button, an npc will stop attacking you and walk away... this is normal?

Dragons of Time 2000-2020
http://dragonsoftime.com
(This post was last modified: 11-01-2016 08:57 AM by x77x.)
11-01-2016 08:21 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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