DragonPrime - LoGD Resource Community

Modules, Themes and other customizations for your game => Completed Modules for version 1.x.x => Topic started by: DaveS on February 21, 2006, 10:20:41 PM



Title: Signet Sale by DaveS
Post by: DaveS on February 21, 2006, 10:20:41 PM
Module Name: signetsale.php
Category: Signet Series (Village)
Worktitle: Signet Sale
Author: DaveS
Date:  February 21, 2006

Addhooks into mapmaker.php or cartographer.ph (both by sixf00t4) if installed.

Description:
The Signet Elemental Dungeon series consists of 5 dungeons and this map selling program. Because the dungeons have a huge potential for experience to be gained without costing any turns, this program has players pay ahead of time for the chance to get that experience. Players pay turns, gold, and gems to unlock the dungeon modules sequentially.

Available for download at:
http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=972

Discussion for the series packet here:
http://dragonprime.net/index.php?topic=4270.0

See my other modules here:
http://dragonprime.net/index.php?topic=3038.0


Title: Re: Signet Sale by DaveS V3.0
Post by: ShadowRaven on February 22, 2006, 11:41:58 AM
This looks like it will be lots of fun! I would definately recommend writting the additional dungeons  :)
 Great job DaveS :)


Title: Re: Signet Sale by DaveS V3.0
Post by: umk on February 22, 2006, 04:53:02 PM
These modules are really a great idea and quite enjoyable. Please do write more dungeons! :)


Title: Re: Signet Sale by DaveS V3.0
Post by: Dragon89 on February 28, 2006, 01:27:48 PM
Yea awesome job!  I can't wait for the others!


Title: Re: Signet Sale by DaveS V3.0
Post by: Ironman on March 11, 2006, 06:21:53 PM
Any ideas why I may be geting a blank page when I click on Antiquities Cart? 


Title: Re: Signet Sale by DaveS V3.0
Post by: DaveS on March 11, 2006, 06:52:46 PM
I just did an uninstall and re-installed the module but it seemed to work for me; I'm not sure what is going wrong for you.  Are you getting a bad nav or any errors?  I'm not sure what's going on.


Title: Re: Signet Sale by DaveS V3.0
Post by: Ironman on March 11, 2006, 07:20:46 PM
Blah, I'm sorry.  It was on my end.  My FTP client screwed up the upload of the signetsale directory.   :-[


Title: Re: Signet Sale by DaveS V3.0
Post by: MvpZERO.net on April 03, 2006, 09:47:37 AM
gotta small question

does anyone know where i can get:  mapmaker.php by sixf00t4 if installed.

I've searched the forum and got no luck,.

Thanks


Title: Re: Signet Sale by DaveS V3.0
Post by: sixf00t4 on April 03, 2006, 10:51:51 AM
search for "cartographer" :)


Title: Re: Signet Sale by DaveS V3.0
Post by: MvpZERO.net on April 03, 2006, 10:56:19 AM
Thanks ^_^ Mapmaker.php should be updated in the desc, tho cus some of us don't know >< ,

Anyways Thanks again.


Title: Re: Signet Sale by DaveS V3.01
Post by: DaveS on April 03, 2006, 11:08:20 AM
v3.01

I actually didn't realize sixf00t4 had two different versions of this module; so I addhooked it so that it would integrate with cartographer.php AND mapmaker.php.


Title: Re: Signet Sale by DaveS
Post by: TGTarheel on August 28, 2017, 09:47:58 AM
Forgive grave-digging here for a minute, but I have a unique problem.  This thing is preventing a character from showing up in the HOF, and it shouldn't.

This character is a test character of mine, and has ONLY the Translation Tool enabled in Superuser Flags...nothing else.

Translation tool IS NOT one of the Flags that should disable one from appearing in the HOF...and this character DOES show up in most HOF's...but NOT in Vanquishers...and I want this character to show up there...as I consider it my main player-character.

I have looked thru the code over and over and I cannot see WHERE it is eliminating superusers from the HOF.  I may have an older version, I am not sure...BUT...ok, just checked, I have version 5.02  I see no problem with this except that I want THIS character to show in the HOF.

If someone has a SU Flag that IS STARRED...then, yeah, I want that character blocked from HOF.

It seems this thing is blocking anyone with any SU Flag.  And it should not.

I am attaching copy of the code from signetsale.php the one I have...from op"hof" and see if someone can point me to where this is happening.
I am not even sure, at this point if non-SU players are being listed, because nobody else has completed the Series on my site.

Meanwhile, i am downloading the later version to see if there is any difference in the coding concerning the HOF.
Code:
if ($op == "hof") {
page_header("Hall of Fame");
$pp = get_module_setting("frpp","signetd5");
$pageoffset = (int)$page;
if ($pageoffset > 0) $pageoffset--;
$pageoffset *= $pp;
$limit = "LIMIT $pageoffset,$pp";
$sql = "SELECT COUNT(*) AS c FROM " . db_prefix("module_userprefs") . " WHERE modulename = 'signetd5' AND setting = 'frhofnum' AND value > 0";
$result = db_query($sql);
$row = db_fetch_assoc($result);
$total = $row['c'];
$count = db_num_rows($result);
if (($pageoffset + $pp) < $total){
$cond = $pageoffset + $pp;
}else{
$cond = $total;
}
$rank = translate_inline("Rank");
$name = translate_inline("Name");
$none = translate_inline("Mierscri is Undefeated!");
output("`b`c`@Vanquishers of the Dark Lord Mierscri`c`b`n`n");
rawoutput("<table border='0' cellpadding='2' cellspacing='1' align='center' bgcolor='#999999'>");
rawoutput("<tr class='trhead'><td>$rank</td><td>$name</td></tr>");
if (get_module_setting("dksincewin")==-1){
$sql = "SELECT ".db_prefix("module_userprefs").".value, ".db_prefix("accounts").".name FROM " . db_prefix("module_userprefs") . "," . db_prefix("accounts") . " WHERE acctid = userid AND modulename = 'signetd5' AND setting = 'frhofnum' AND value > 0 ORDER BY (value+0) DESC $limit";
$result = db_query($sql);
if (db_num_rows($result)==0){
output_notl("<tr class='trlight'><td colspan='3' align='center'>`&$none`0</td></tr>",true);
}else{
for($i = $pageoffset; $i < $cond && $count; $i++) {
$row = db_fetch_assoc($result);
if ($row['name']==$session['user']['name']){
rawoutput("<tr class='trhilight'><td>");
}else{
rawoutput("<tr class='".($i%2?"trdark":"trlight")."'><td>");
}
$j=$i+1;
output_notl("$j.");
rawoutput("</td><td>");
output_notl("`&%s`0",$row['name']);
rawoutput("</td></tr>");
}
}
}else{
$names=translate_inline(array("`)DarkSlayer","`&Vanquisher","`@Grand Vanquisher","`#Supreme Vanquisher","`1Nemesis","`6Bane of Evil","`3Air Mage","`QEarth Mage","`!Water Mage","`\$Fire Mage","`%Power Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage","`^Signet Mage"));
$sql = "SELECT ".db_prefix("module_userprefs").".value, ".db_prefix("accounts").".name FROM " . db_prefix("module_userprefs") . "," . db_prefix("accounts") . " WHERE acctid = userid AND modulename = 'signetsale' AND setting = 'completednum' AND value > 0 ORDER BY (value+0) DESC $limit";
$result = db_query($sql);
if (db_num_rows($result)==0){
output_notl("<tr class='trlight'><td colspan='3' align='center'>`&$none`0</td></tr>",true);
}else{
for($i = $pageoffset; $i < $cond && $count; $i++) {
$row = db_fetch_assoc($result);
if ($row['name']==$session['user']['name']){
rawoutput("<tr class='trhilight'><td>");
}else{
rawoutput("<tr class='".($i%2?"trdark":"trlight")."'><td>");
}
$j=$i+1;
output_notl("$j.");
rawoutput("</td><td>");
output_notl("`&%s`0",$row['name']);
rawoutput("</td><td>");
output_notl("`@%s`0",$names[$row['value']]);
rawoutput("</td></tr>");
}
}
}
rawoutput("</table>");
if ($total>$pp){
addnav("Pages");
for ($p=0;$p<$total;$p+=$pp){
addnav(array("Page %s (%s-%s)", ($p/$pp+1), ($p+1), min($p+$pp,$total)), "runmodule.php?module=signetsale&op=hof&page=".($p/$pp+1));
}
}
addnav("Other");
addnav("Back to HoF", "hof.php");
if (is_module_active("mapmaker")){
if(get_module_setting("mapmaker")==1) blocknav("runmodule.php?module=mapmaker");
}
if (is_module_active("cartographer")){
if(get_module_setting("mapmaker")==1) blocknav("runmodule.php?module=cartographer");
}
villagenav();
}


Title: Re: Signet Sale by DaveS
Post by: Boris735 on September 13, 2017, 02:23:30 AM
Nothing in the snippet you showed refers to superuser flags (on first glance, anyway), so are you sure that your analysis is correct?  If you disaable the translation flag for it, does it show up in the HoF once again?

(For that matter, it wasn't clear: Is the character failing to show up in all HoF's, or just the one associated with that module?)

Looking at the value of SU_HIDE_FROM_LEADERBOARD in lib/constants.php, the most likely flag to trigger this behaviour is SU_INFINITE_DAYS; are you sure you haven't enabled that on your character?


Title: Re: Signet Sale by DaveS
Post by: TGTarheel on September 13, 2017, 06:15:26 AM
Nothing in the snippet you showed refers to superuser flags (on first glance, anyway), so are you sure that your analysis is correct?  If you disaable the translation flag for it, does it show up in the HoF once again?

(For that matter, it wasn't clear: Is the character failing to show up in all HoF's, or just the one associated with that module?)

Looking at the value of SU_HIDE_FROM_LEADERBOARD in lib/constants.php, the most likely flag to trigger this behaviour is SU_INFINITE_DAYS; are you sure you haven't enabled that on your character?


No.  This character shows up in most HOF's...even in the other HOF for the Signets, the one that shows progress.  And only has Translator tool checked.  Since no other characters have done the  Signets yet, I do not know if anyone shows up.  But I will look in the places you mention, thanks for the hints.


Title: Re: Signet Sale by DaveS
Post by: Eliwood on September 13, 2017, 07:57:27 AM
Try to print the value of $pp after this line:
Code:
$pp = get_module_setting("frpp","signetd5");


Title: Re: Signet Sale by DaveS
Post by: TGTarheel on September 13, 2017, 12:11:13 PM
Try to print the value of $pp after this line:
Code:
$pp = get_module_setting("frpp","signetd5");

OK, what does that tell me?  Let me look in the code and see what I can find.  It is a setting, so it applies to the whole module and not just to a specific character.
OK, i my settings, this is set to 35.  That is the default setting.  I see nothing in the coding that would cause it to get any other value.


Title: Re: Signet Sale by DaveS
Post by: Eliwood on September 13, 2017, 01:41:56 PM
Since you mentioned that only 1 character should be there and he isn't, I wanted to exclude the possibility of that value being 0, thus setting the limit of the sql query to 0.

If you take away translator rights, does the character show up there? (Is this list working, like, at all?)

Code:
SELECT module_userprefs.value, module_userprefs.setting, accounts.name FROM module_userprefs, accounts WHERE acctid = userid AND modulename = "signetd5" and acctid = 1 ORDER BY setting, value

Adjust if you are using a table prefix, and set in the number of the account you'd like to show up.
Using this SQL query, you (should) will get a list of of module userprefs belonging to that account. Is in this list any setting named "frhofnum"? What is its value?


Title: Re: Signet Sale by DaveS
Post by: TGTarheel on September 13, 2017, 05:07:54 PM
Since you mentioned that only 1 character should be there and he isn't, I wanted to exclude the possibility of that value being 0, thus setting the limit of the sql query to 0.

If you take away translator rights, does the character show up there? (Is this list working, like, at all?)

Code:
SELECT module_userprefs.value, module_userprefs.setting, accounts.name FROM module_userprefs, accounts WHERE acctid = userid AND modulename = "signetd5" and acctid = 1 ORDER BY setting, value

Adjust if you are using a table prefix, and set in the number of the account you'd like to show up.
Using this SQL query, you (should) will get a list of of module userprefs belonging to that account. Is in this list any setting named "frhofnum"? What is its value?

OK, you just completely lost me.
and I tried to take the translator tool and it did not show up but I assumed I would like have to go thru a whole nother kill without the tool and I can't do that, i am ding fixes on my game.  And nobody else on the site seems to want to try to do the Signets.  A pain, because they are gin and pay a ton.
But nobody seems to want to go through something they do not have the immediate solution to.

I am not quite sure, though, what you are actually asking me to do or how I go about doing it.  Seriously, i know about coding ... and just enough to be dangerous, and I do not know all this other stuff you are talking, I really am NOT very good at this stuff, actually.

© 2017 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines