DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • June 25, 2016, 12:25:06 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Random Bounty (Converted from 97)  (Read 3986 times)
0 Members and 1 Guest are viewing this topic.
lonnyl
Guest
« on: August 01, 2004, 06:32:40 AM »

I am starting small..... hehehe converted the random bounty special from 0.9.7 or 0.9.8

http://www.pqcomp.com/modules/mydownloads/visit.php?cid=3&lid=27

I have to comment that it seems that I think I picked the wrong one to start small with too.... as the bounty code has changed completely.... what used to be a 5 line file is now a 50 line file (or so).
« Last Edit: February 01, 2005, 06:43:33 AM by lonnyl » Logged
Kendaer
Guest
« Reply #1 on: August 01, 2004, 12:13:49 PM »

Lonny,

Unless you are trying to track how many bounties have been set on each user by your event, the line
Code:
set_module_pref("bounties",get_module_pref("bounties")+1);
is not necessary.

That line in dag is used to track how many bounties the user himself has set that day.  If you wanted a random bounty encounter to increment that (ie, if they get a random bounty it lets them do less) then you want to use
Code:
set_module_pref("bounties","dag",get_module_pref("bounties")+1);
which will increment that preference in the dag module.

Also, your value for 'setter' is wrong unfortunately.
the setter database field is an int (the account id of the person who set the bounty).  You want to use a 0 there which will show that the bounty was added by the 'system' rather than a player.

(ie, change \"Authorities\" to 0 in your SQL statement)

And yes, the bounty system did change a lot.  This was needed to prevent people from collecting bounties on someone that they themselves set.
« Last Edit: August 01, 2004, 12:15:04 PM by Kendaer » Logged
lonnyl
Guest
« Reply #2 on: August 01, 2004, 03:10:30 PM »

Thanks fixed and uploaded....
Logged
Damien
Guest
« Reply #3 on: October 25, 2004, 02:41:38 PM »

Couple of small requests: Smiley
Could you add maximum amount of bounty in the settings(maybe in co-op with dag bounties if installed)?... and perhaps there would be nice to have setting for how much per level(max) the authorities can set a bounty(now it seems to be e_rand(1,1000))?

My bounty settings generally are max 500/level/player which makes max 7500 at level 15 but there are now over 10000 bounties on tenth level players because of the authorities Smiley

- Damien
Logged
lonnyl
Guest
« Reply #4 on: October 26, 2004, 06:21:35 AM »

Updated to Ver (1.2)...
Now with admin selectable max bounty.....

Shouldn't I have posted this thread in the forest specials... DUH!!!!
Logged
Damien
Guest
« Reply #5 on: October 26, 2004, 07:34:00 AM »

There seems to be a little mistake in the code where creating $info array. " ); " is in a wrong place, I think. Easy to fix.

Thanks for adding this setting. Bounty on me has raised to 21000 already so this is something I definitely need Smiley


- Damien
Logged
Jim
Guest
« Reply #6 on: October 26, 2004, 09:04:04 AM »

Parse error: parse error, unexpected T_DOUBLE_ARROW in www/lotgd/modules/rndbounty.php on line 14
Logged
lonnyl
Guest
« Reply #7 on: October 26, 2004, 09:48:13 AM »

I hate it when that happens..... all fixed and uploaded.
Logged
WebPixie
Guest
« Reply #8 on: October 28, 2004, 06:38:16 PM »

I installed this then got a bounty over 12,000 gold. My max is set to 200 a level and the character was only 4... am I doing something wrong?
Logged
lonnyl
Guest
« Reply #9 on: October 29, 2004, 06:00:15 AM »

Yes... I have noticed this on occasion.. I suppose I could pull myself from the Page Generation issues I experience on occasion and get this one looked at....
Logged
WebPixie
Guest
« Reply #10 on: October 29, 2004, 06:13:21 AM »

This might be something....

Code:
   $bount = (e_rand(100,get_module_setting('max'))*$session['user']['level']);

The script has the Max Bounty as default of 10,000. Max of 10,000 * userLevel would certainly be huge.... maybe I just misunderstood. Is Max bounty the max a bounty can be period, or the max * level?

If it's max * level it's an easy fix, I just lower my max... Tongue
Logged
lonnyl
Guest
« Reply #11 on: October 29, 2004, 06:20:27 AM »

Actually it was the right line.... but just a couple of misplaced brackets....

Updated to 1.21
Logged
WebPixie
Guest
« Reply #12 on: October 29, 2004, 12:21:48 PM »

I'm getting a white screen when I hit install/reinstall etc....

Don't see anything blatantly wrong with the code so I don't know what's the trouble Sad
Logged
Damien
Guest
« Reply #13 on: October 29, 2004, 05:15:36 PM »

Actually there's again the problem with ");" in a wrong place in $info array in get_moduleinfo() Smiley
Logged
WebPixie
Guest
« Reply #14 on: October 29, 2004, 06:52:48 PM »

Actually there's again the problem with ");" in a wrong place in $info array in get_moduleinfo() Smiley


Good catch, that fixed it right up Smiley Thanks a bunch.

Oh, also... Maximum Bounty in this script is (max * level) right? Not just plain max?

Code:
     $bount = e_rand(100,(get_module_setting('max')*$session['user']['level']));


That shows the bounty is a random number from 100 to (max *level) not max as plain max. Or did I mess something up? Plain max would be this right:

$bount = e_rand(100,get_module_setting('max'));

I think the grotto settings wording is throwing me off of what it should be, sorry Sad Just want to make sure I have it right and not messing it up.
« Last Edit: October 29, 2004, 06:58:30 PM by WebPixie » Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
47 Guests, 1 User
GreyWolf
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search