Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extra gold killings mobs
Author Message
Van Glan Bloom
Journeyman
*

Posts: 104
Likes Given: 2
Likes Received: 3 in 3 posts
Joined: Jun 2013
Reputation: 0



Post: #1
Extra gold killings mobs
Hi guys,

I need your help with this script:

[ITEMDEF i_arken_talisman]
Defname=i_arken_talisman
ID=i_talisman4
Name=Arken talisman
type=t_jewelry
Tevents=t_arken
Tevents=t_luck_item
tag.luck=100

ON=@EQUIP
IF (<src.findlayer.9.baseid>==i_arken_talisman)
src.events=+e_more_money
else
Return 0
endif

ON=@UNEQUIP
src.events=-e_more_money

[Events e_more_money]
ON=@kill
if (<act.isplayer>)
obj=<argo.uid>
if (<obj.isevent.e_exp>)
local.new=<new>
serv.newitem i_gold,{1000 2000}
bounce <new>
new=<local.new>
return 1
endif
endif


The script serve as the player kill a mob, this drop extra gold.
When I kill the mob with him GM drop the gold, but when you kill the player nothing happens. Can you help?
06-30-2013 10:54 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: Extra gold killings mobs
Look at the wiki page for @Kill http://wiki.sphere.torfo.org/index.php/@Kill ... There is no ACT reference explicitly set in that trigger. The reason it works for your GM, but not your players is coincidental.

Also, "saving" NEW in a LOCAL variable should not be necessary... however, failing to save OBJ, may cause you problems later since OBJ is a global reference. Why even use OBJ? My suggestion is to never use it.

Lastly, using RETURN 1 in @Kill prevents the killer from receiving credit for the kill... do you really want that?

Here is a simpler alternative:

Code:
[Events e_more_money]
ON=@kill
if (<SRC.isplayer>) && (<SRC.isevent.e_exp>)
   serv.newitem i_gold,{1000 2000},<SRC>
endif
(This post was last modified: 07-01-2013 03:07 AM by RanXerox.)
07-01-2013 02:58 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #3
RE: Extra gold killings mobs
I could have sworn I answered this one last night...

[Image: 2nis46r.jpg]
07-01-2013 06:46 AM
Visit this user's website 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)