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
Loot help
Author Message
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #1
Loot help
I wonder if there is some way that when an NPC is killed, when the SRC have a tag, leave an item in the body of the NPC...
or another way to achieve
02-10-2015 11:33 PM
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: #2
RE: Loot help
you can add the item using

ON=@Create
ITEM=i_item

or

ON=@Death
NEWLOOT i_item

or

ON=@DeathCorpse
ARGO.NEWLOOT i_item //here ARGO = corpse
02-11-2015 12:31 AM
Find all posts by this user Like Post Quote this message in a reply
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #3
RE: Loot help
the point is that the item is obtained only if there is an active tag
02-11-2015 12:38 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: Loot help
Who is SRC?

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
02-11-2015 01:24 AM
Find all posts by this user Like Post Quote this message in a reply
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #5
RE: Loot help
SRC is the player
If a player has a tag, for killing a npc will leave an object in the body of the monster
02-11-2015 06:45 AM
Find all posts by this user Like Post Quote this message in a reply
Jim
Apprentice
*

Posts: 28
Likes Given: 1
Likes Received: 12 in 4 posts
Joined: Jan 2015
Reputation: 0



Post: #6
RE: Loot help
maybe you can use "ON=@DeathCorpse" as Coruja said. (attach this trigger to the Monster)
and make some judgement in this trigger.
e.g. if the attacker.max (or .last) is the player who has the tag. then "ARGO.NEWLOOT i_item //here ARGO = corpse", if not then do nothing
02-11-2015 05:42 PM
Find all posts by this user Like Post Quote this message in a reply
Artyk
Journeyman
*

Posts: 75
Likes Given: 43
Likes Received: 9 in 9 posts
Joined: Sep 2014
Reputation: 0



Post: #7
RE: Loot help
i would suggest to use @GetHit on the monster to check if someone with that tag active is attacking him and place another tag on the monster, then use @DeathCorpse checking the monster tag
02-11-2015 10:45 PM
Find all posts by this user Like Post Quote this message in a reply
pushim
Journeyman
*

Posts: 60
Likes Given: 20
Likes Received: 2 in 2 posts
Joined: Dec 2013
Reputation: 0



Post: #8
RE: Loot help
ON=@DEATHCORPSE
IF (<TAG0.LOOT1>)
ARGO.NEWLOOT i_katana
ENDIF

i can't :/
something is wrong
02-12-2015 12:23 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #9
RE: Loot help
You are using (<tag0.loot1>) to check, if you use no reference there ... you'll be checking on the character itself, so first you have to tell Sphere who is the 'killer' there:

Code:
ON=@DeathCorpse
ref1=<attacker.last> // this will retrieve the uid of the character who last hitted this one. If you use <attacker.max> youl'll retrieve the uid of the character who damaged the most, I suggest you to read attacker in wiki for more information.
if (<ref1.tag0.loot1>)
argo.newloot i_katana
endif
02-12-2015 02:19 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes XuN's post
Artyk
Journeyman
*

Posts: 75
Likes Given: 43
Likes Received: 9 in 9 posts
Joined: Sep 2014
Reputation: 0



Post: #10
RE: Loot help
Perhaps I haven't explained well, what i meant is:

Code:
ON=@GetHit
IF (<SRC.TAG0.LOOT1>)
  TAG0.LOOT1 = 1
ENDIF

ON=@DeathCorpse
IF (<TAG0.LOOT1>)
  ARGO.NEWLOOT i_katana
ENDIF

Xun's solution work as well, but you get the loot only if the tag is active on the last attacker, with this one you get the loot if any of the attackers have the tag active
02-12-2015 10:53 PM
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)