Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ON=@kill
Author Message
Van Glan Bloom
Journeyman
*

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



Post: #11
RE: ON=@kill
My intention is that the player receives a bonus when you kill the mob with e_exp event. I got to use all that incluiste the post and none of those did what I wanted = /
03-28-2014 01: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: #12
RE: ON=@kill
just use @ExpChange instead @Kill
http://wiki.sphere.torfo.org/index.php/@ExpChange

Code:
[EVENTS e_exp]
ON=@ExpChange
SYSMESSAGE You killed <ARGO.NAME> and gained more <ARGN1>gp
ARGO.NEWGOLD <ARGN1> //the gold will be created on NPC
03-29-2014 01:23 AM
Find all posts by this user Like Post Quote this message in a reply
UltimaAku
Journeyman
*

Posts: 125
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 1



Post: #13
RE: ON=@kill
Is it specific monster or random chance? if it's a random monster, you could have a randomiser put in.

[Events e_more_money_random]
ON=@kill
SRC.VAR.RAND=<EVAL {1 50}> //2% chance or 1/50 chances
if (<ARGO.brain> = 0) // Prevents it working against other players
RETURN 0 // but the kill still happens
ELSEIF (<SRC.VAR.RAND>=1) // Random Value is 1
SRC.SYSMESSAGE You have received bonus gold from <ARGO.NAME>.
SRC.newitem i_gold // Creates the new item
SRC.ACT.AMOUNT = (<ARGO.STR> + <ARGO.DEX> + <ARGO.INT>) /// the tougher the mob, the more the gold
SRC.ACT.BOUNCE /// gives it to the player
RETURN 0 /// And the creature dies
endif

This script could be used, but it would work on anything, if you use this, i'd recommend attaching this event to a weapon of some sort, because something like this could work on a cow... although it gives little gold. (30 + 5 + 15 = 50, so 2% chance of dropping 50 gold, worth? lol)

But if it's specific, try this:

[Events e_more_money_specific]
ON=@kill
SRC.VAR.RAND=<EVAL {1 10}> //10% chance or 1/10 chances
IF (<SRC.VAR.RAND>=1) // Random Value is 1
IF (<ARGO.TAG.BONUSCHANCE>=1) // Checks to see if it's the creature that drops the bonus gold
SRC.SYSMESSAGE You have received bonus gold from <ARGO.NAME>.
SRC.newitem i_gold // Creates the new item
SRC.ACT.AMOUNT = (<ARGO.STR> + <ARGO.DEX> + <ARGO.INT>) /// the tougher the mob, the more the gold
SRC.ACT.BOUNCE /// gives it to the player
RETURN 0 /// And the creature dies
endif

then add TAG.BONUSCHANCE=1 to any monster you want to have the gold bonus chance.
(This post was last modified: 03-29-2014 03:52 AM by UltimaAku.)
03-29-2014 03:44 AM
Find all posts by this user Like Post Quote this message in a reply
Van Glan Bloom
Journeyman
*

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



Post: #14
RE: ON=@kill
Thx UltimaAku you really helped me =)

+1 Reputation for you and thx you again =)
03-29-2014 09:45 AM
Find all posts by this user Like Post Quote this message in a reply
UltimaAku
Journeyman
*

Posts: 125
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 1



Post: #15
RE: ON=@kill
No problem, thanks for the rep ^^
03-30-2014 09:16 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)