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
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extra damage vs Monster
Author Message
Lincoln
Apprentice
*

Posts: 11
Likes Given: 13
Likes Received: 0 in 0 posts
Joined: Apr 2016
Reputation: 0



Post: #1
Extra damage vs Monster
Hello All,

Quick question!

If I wanted to make a weapon that caused extra damage towards 1 or multiple types of monsters, what is the best way of accomplishing that goal?

I put a tag on the weapon, so that if the weapon has a certain tag it is meant to cause extra damage towards a certain monster(s)

Sort of like the below

ITEMDEF i_blah_sword
name=blah sword
weight=1
type=t_weapon_sword

ON=@create
f_randomblah
tag.swordblah=(<tag.swordblah>)

on=@equip
events +e_swordboost

on=@unequip
events -e_swordboost

[function f_randomblah]
dorand 3
tag.swordblah=boo
tag.swordblah=rawr
rag.swordblah=meow
enddo

[events e_swordboost]
on=@hit
if (<tag0.swordblah>==boo)
strmatch("<src.body>","c_skeleton") || strmatch ("<src.body>","c_elem_water")
src.hits -{500 1000}
endif
if (<tag0.swordblah>==rawr)
strmatch("<src.body>","c_daemon")
src.hits -{500 1000)
endif


Sooo clearly it doesn't work!

Basically what happens now is that the sword will cause between 500 1000 damage to every monster!
What am I doing wrong (script above was just a rough thing, but same concept)

Any help would be appreciated as always!
(This post was last modified: 12-03-2016 12:11 AM by Lincoln.)
12-03-2016 12:10 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Extra damage vs Monster - Lincoln - 12-03-2016 12:10 AM
RE: Extra damage vs Monster - Coruja - 12-03-2016, 01:27 AM
RE: Extra damage vs Monster - pointhz - 12-03-2016, 01:54 AM
RE: Extra damage vs Monster - Ultima One - 12-03-2016, 03:22 AM

Forum Jump:


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