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
Help
Author Message
redblack
Apprentice
*

Posts: 26
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2017
Reputation: 0



Post: #1
Help
I need an explanation on how to make a script for npc who use a gun or a rifle, can you help me?
Thank you all
02-21-2017 08:31 PM
Find all posts by this user Like Post Quote this message in a reply
redblack
Apprentice
*

Posts: 26
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2017
Reputation: 0



Post: #2
RE: Help
no one can help me?
02-22-2017 05:04 PM
Find all posts by this user Like Post Quote this message in a reply
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #3
RE: Help
Try to explain a little better, are you wanting to know how to make a custom npc? Are you wanting to make a gun?
02-23-2017 11:25 AM
Find all posts by this user Like Post Quote this message in a reply
redblack
Apprentice
*

Posts: 26
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2017
Reputation: 0



Post: #4
RE: Help
I would like to create a system for a gun to six shots, also an NPC opponent (like an archer) who uses a gun or a rifle as a weapon, so he can shoot from a distance.
Geazie
02-23-2017 04:41 PM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #5
RE: Help
(02-23-2017 04:41 PM)redblack Wrote:  I would like to create a system for a gun to six shots, also an NPC opponent (like an archer) who uses a gun or a rifle as a weapon, so he can shoot from a distance.
Geazie

ciao!
have you tought about using EFFECT already? if you're not planning on to make a new class with custom skills, using EFFECT you need just to provide a bullet animation (if you need it, otherwise just use a default animation to simulate the shoot like magic arrow)

Lo0k H3re

btw things are changing if you also graphically want a npc equipping a gun or a proper item gun that can be equipped by any npc/player. In both cases you have to provide new animations.
(This post was last modified: 02-24-2017 01:10 AM by zottolo.)
02-24-2017 01:01 AM
Find all posts by this user Like Post Quote this message in a reply
redblack
Apprentice
*

Posts: 26
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2017
Reputation: 0



Post: #6
RE: Help
I created a npc type archer, only instead arc has a gun, I would need one without effect script where instead of the arrow there is a bullet (which is not seen) but feels just the sound of the gunshot
02-24-2017 02:17 AM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #7
RE: Help
[ITEMDEF i_gun]
NAME=Gunny Gun
ID=i_bow
DAM=20
TYPE=t_weapon_bow
SKILL=Archery
SPEED=3.0
RANGE=2,12
TWOHANDS=N //requires two hands? No is set
WEIGHT=0.5
VALUE=100
RESOURCES= 10 i_ingot_iron //???
SKILLMAKE= 100.0 TINKERING

TDATA3= // bullet id
TDATA4= //effect id

CATEGORY=Weapons
SUBSECTION=Guns
DESCRIPTION=Gun

ON=@Create
HITPOINTS={100 200}
COLOR=00


didn't test this but it's a simple way to achieve what you need

about the sound, i think you can just add it on @hit trigger but i don't know if the bow sound will be overridden we must wait for someone better than me ^_^

ok i've found these too

AMMOANIM RW Overrides TDATA4 for bow/crossbow type weapons.
AMMOANIMHUE RW Sets the color of the effect when firing bow/crossbow type weapons.
AMMOANIMRENDER RW Sets the render mode of the effect when firing bow/crossbow type weapons.
AMMOCONT RW Sets the container UID or ID where to search for ammos for bow/crossbow type weapons.
AMMOSOUNDHIT RW Overrides the hit sound on weapons.
AMMOSOUNDMISS RW Overrides the miss sound on weapons.
AMMOTYPE RW Overrides TDATA3 for bow/crossbow type weapons.

now you can totally shoot that man down ^_^
(This post was last modified: 02-25-2017 03:53 AM by zottolo.)
02-25-2017 03:43 AM
Find all posts by this user Like Post Quote this message in a reply
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #8
RE: Help
you can change the sound with either @hit or @damage I believe, just use return 1 and it will override the bow sound.
02-25-2017 09:51 AM
Find all posts by this user Like Post Quote this message in a reply
redblack
Apprentice
*

Posts: 26
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2017
Reputation: 0



Post: #9
RE: Help
Kindly you can give an example of how to use these parameters?

- AMMOANIM RW Overrides TDATA4 for bow/crossbow type weapons.
- AMMOANIMHUE RW Sets the color of the effect when firing bow/crossbow type weapons.
- AMMOANIMRENDER RW Sets the render mode of the effect when firing bow/crossbow type weapons.
- AMMOCONT RW Sets the container UID or ID where to search for ammos for bow/crossbow type weapons.
- AMMOSOUNDHIT RW Overrides the hit sound on weapons.
- AMMOSOUNDMISS RW Overrides the miss sound on weapons.
- AMMOTYPE RW Overrides TDATA3 for bow/crossbow type weapons.

thank you
02-25-2017 06:08 PM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #10
RE: Help
You have to insert them in the definition of the item...add them replacing tdata3 and 4 in the example i gave u before

(02-25-2017 09:51 AM)Leonidas Wrote:  you can change the sound with either @hit or @damage I believe, just use return 1 and it will override the bow sound.

if you return 1 those triggers ure going to override the normal combat behaviours am i wrong?
(This post was last modified: 02-25-2017 11:36 PM by zottolo.)
02-25-2017 11:34 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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