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
Extra Loot
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 Loot
Well this script has been functioning well, until the few days it stopped working altogether, his function is that the player receives extra gold after killing mobs, but has not worked properly

Event added in Item :
Code:
....
ON=@EQUIP
src.events=+e_more_money
src.moddex += 5
src.modint += 5
src.modstr += 5

ON=@UNEQUIP
src.events=-e_more_money
src.moddex -= 5
src.modint -= 5
src.modstr -= 5

Event
Code:
[Events e_more_money]
ON=@kill
SRC.VAR.RAND=<EVAL {1 50}> //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
endif
03-22-2015 08:26 AM
Find all posts by this user Like Post Quote this message in a reply
Shamino
Noob Scripter
*

Posts: 57
Likes Given: 5
Likes Received: 15 in 11 posts
Joined: Mar 2012
Reputation: 0

Exilio UO

Post: #2
RE: Extra Loot
Try...

Code:
ON=@EQUIP
src.events +e_more_money
src.moddex += 5
src.modint += 5
src.modstr += 5

ON=@UNEQUIP
src.events -e_more_money
src.moddex -= 5
src.modint -= 5
src.modstr -= 5

Code:
[Events e_more_money]
ON=@kill
REF1=<ARGO.UID>
IF (<R50>==1) // Random Value is 1
IF (<REF1.TAG0.BONUSCHANCE>==1) // Checks to see if it's the creature that drops the bonus gold
SRC.SYSMESSAGE You have received bonus gold from <REF1.NAME>.
SERV.NEWITEM=i_gold // Creates the new item
NEW.AMOUNT=<EVAL (<REF1.STR> + <REF1.DEX> + <REF1.INT>)> /// the tougher the mob, the more the gold
NEW.BOUNCE <SRC.FINDLAYER.21.UID> /// gives it to the player
ENDIF
ENDIF

"My world is hell for the infidels. My blood pleasure of the immortals"
[Image: 2ec003662b15c61da117767a59bb99bao.jpg]
(This post was last modified: 03-22-2015 09:04 AM by Shamino.)
03-22-2015 09:00 AM
Visit this user's website 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: #3
RE: Extra Loot
Have you checked all your variables?

(<ARGO.TAG.BONUSCHANCE>=1)

The NPC being killed has to have the tag on them

SRC.VAR.RAND=<EVAL {1 50}>

The chance of this happening is 1/50, so small chance of it happening

This looks like a weapon/armour piece that grants gold for killing NPCs on a small chance. I'd say either remove the tag requirement and set it to something like this:

ON=@kill
SRC.VAR.RAND=<EVAL {1 50}> //2% chance or 1/50 chances
if (<ARGO.brain> > 0) // Doesn't trigger on players.
SRC.SYSMESSAGE You have received bonus gold from <ARGO.NAME>.
SRC.SYSMESSAGE (<ARGO.STR> + <ARGO.DEX> + <ARGO.INT>) has been put into your backpack.
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 // but the kill still happens
ENDIF

Now the tags gone, which means it has a chance on working on all NPCs, but the chance remains the same at 2%
04-28-2015 07: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)