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

Pages: [1]   Go Down
  Print  
Author Topic: dragonkill requirements to start a guild  (Read 3384 times)
0 Members and 1 Guest are viewing this topic.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« on: February 10, 2005, 08:06:57 AM »

http://dragonprime.net/users/sixf00t4/dkreq4gldldrs.zip

defaults at 3 dragon kills to start a guild, gives them the message that they wreak of farmboy if they try before hand.
Logged

Shadeless
Captain of the Guard
***
Offline Offline

Posts: 231


View Profile WWW
« Reply #1 on: March 27, 2013, 01:18:43 AM »

hey
i installed this modul
and you can also found a clan, when you member in one.
Isn't it, that you only can found a clan, if you without anyone?
Logged
WereMagi
Militia
**
Offline Offline

Posts: 84


I like trains.


View Profile
« Reply #2 on: March 27, 2013, 01:59:10 AM »

hey
i installed this modul
and you can also found a clan, when you member in one.
Isn't it, that you only can found a clan, if you without anyone?

Well, that seems awkward... You sure it's this module that is give you this first off? I'd check myself but I'm on my iPod, I can't look at code and playing on my test server is kinda hard on it...
Logged
Nder'
Codemeister
****
Offline Offline

Posts: 255


Google is our savior!


View Profile
« Reply #3 on: March 27, 2013, 12:27:40 PM »

Yes. You can only create a clan if you are not in one currently (this is, if you have the required gems and gold).

However, as an admin, you can use the Clan Editor to create and delete clans (among other things).


Hope this helps  Grin
Logged

insert sympathy here

Message me!
Shadeless
Captain of the Guard
***
Offline Offline

Posts: 231


View Profile WWW
« Reply #4 on: March 27, 2013, 01:07:06 PM »

i know that i can use the clan editor, but after installing the dk requirement modul for clans, this option is shown in the clan hall for everyone to found a clan.

normally, that is what i thought is, that if u want to found a clan at karissa (if u are not in one) this programm asks, if you have 3 dks. when you have less you can't found it.

but now it's shown in every clan hall.

here the code:
Quote
<?
function dkreq4gldldrs_getmodulei nfo(){
   $info = array(
      "name" => "Dragon kill requirement for guild leaders",
      "version" => "20070207",
      "vertxtloc"=>"http://www.legendofsix.com/",
      "author" => "Sixf00t4",
      "category" => "Clan",
      "download" => "http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=1087",
   
"settings"=>array(
         "Dragon Kill for Guild Creation Settings,title",
         "dkreq"=>"Dragonkills required to create new guild?,int|3",
         ),

);
   return $info;
}

function dkreq4gldldrs_install(){
   module_addhook("footer-clan");
   return true;
}

function dkreq4gldldrs_uninstall(){
   return true;
}

function dkreq4gldldrs_dohook($hookname, $args){
global $session;
   switch($hookname){
        case footer-clan:
            if (get_module_setting('dkreq') > $session['user']['dragonkills']){   
                blocknav("clan.php?op=new");
                addnav("Clan Options");
                addnav("Apply for a new Clan","runmodule.php?module=dkreq4gldldrs");
            break;
            }
        }
return $args;
}

function dkreq4gldldrs_run(){
global $session;
$op = httpget('op');
if ($op==""){
page_header("Guild Creation");
output("You still got farmboy written all over you.  What kind of a leader would you be if you can't even tell members how to slay a dragon?");
addnav("Back to Clans","clan.php");
page_footer();
}
}
?>
Logged
Nder'
Codemeister
****
Offline Offline

Posts: 255


Google is our savior!


View Profile
« Reply #5 on: March 27, 2013, 01:32:18 PM »

i know that i can use the clan editor, but after installing the dk requirement modul for clans, this option is shown in the clan hall for everyone to found a clan.

normally, that is what i thought is, that if u want to found a clan at karissa (if u are not in one) this programm asks, if you have 3 dks. when you have less you can't found it.

but now it's shown in every clan hall.




What message? The only output in this module is You still got farmboy written all over you.  What kind of a leader would you be if you can't even tell members how to slay a dragon?
Logged

insert sympathy here

Message me!
Shadeless
Captain of the Guard
***
Offline Offline

Posts: 231


View Profile WWW
« Reply #6 on: March 27, 2013, 01:34:54 PM »

yeah it is
but thats not the problem
the problem is, that it's shown everywhere.
when you are a clanmember it's in the clan hall, not even when you are not in a clan

It should only comes, when a farmboy or something lower than 3dks want to found a clan, when this person is NOT a clan member.

you understand?
« Last Edit: March 27, 2013, 01:36:25 PM by Shadeless » Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1722



View Profile
« Reply #7 on: March 27, 2013, 03:20:43 PM »

Try replacing your dohook() function with the following (don't copy the <?php bit):

Code:
<?php
function dkreq4gldldrs_dohook($hookname$args){
    global 
$session;
    switch(
$hookname){
        case 
footer-clan:
            if (
get_module_setting('dkreq') > $session['user']['dragonkills'] && !$session['user']['clanid']){   
                
blocknav("clan.php?op=new");
                
addnav("Clan Options");
                
addnav("Apply for a new Clan","runmodule.php?module=dkreq4gldldrs");
            }
        break;
    }
    return 
$args;
}
« Last Edit: March 27, 2013, 03:33:43 PM by Aeo ~ » Logged

Shadeless
Captain of the Guard
***
Offline Offline

Posts: 231


View Profile WWW
« Reply #8 on: March 27, 2013, 03:32:20 PM »

works
thank u a lot

Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1722



View Profile
« Reply #9 on: March 27, 2013, 03:39:54 PM »

works
thank u a lot

Glad it does! For those wondering what I did, the nav issue was fixed by only showing it if a user's clan ID equaled zero. I believe the output issue was due to the fact that the 'break;' in the dohook() function was in the wrong place, hence the case was never completely cut off, therefore executing everything to the end of the file (including the output).
Logged

Pages: [1]   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
38 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search