collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Guild Depot  (Read 46079 times)

0 Members and 4 Guests are viewing this topic.

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Guild Depot
« on: July 06, 2006, 07:14:46 am »
Finally got around to finishing it/uploading it.

Featured: It's like a bank, you add your items that are open for the org to have/borrow. People can search for specific items, be able to see who owns the current item, and be able to ask for it.

Suggestions or think of stuff to add? Lemme know. Hope you enjoy it =)



**NOTE**
This only works on the Department style guild ranking system. I haven't been able to figure out a universal code to match all org rankings. It's fairly simple to fix to match it to your org. Or just remove it altogether. Your choice :)

Once I make changes and updates according to guilds, I'll update this. Still working-progress.
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Pharexys

  • BeBot Apprentice
  • ***
  • Posts: 117
  • Karma: +0/-0
Re: Guild Depot
« Reply #1 on: July 06, 2006, 07:55:59 pm »
Sounds very nice ;D i'll post if i see anything wrong.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Guild Depot
« Reply #2 on: July 06, 2006, 10:39:46 pm »
If you go by rank_id instead of rank, you have two assurances:

rank 0 = Org Leader (President, Lord, whatever...)
rank 1 = 2nd in command (General, whatever.)

However rank 1 can't always do much. See below. :)

Department
0=President
1=General
2=Squad Commander
3=Unit Commander
4=Unit Leader
5=Unit Member
6=Applicant

In a Department, the rank Unit Commander and higher allows organization members to recruit new members.

Faction
0=Director
1=Board Member
2=Executive
3=Member
4=Applicant

In a Faction, only the Director and Board Members can invite new members.

Republic
0=President
1=Advisor
2=Veteran
3=Member
4=Aplicant

In a Republic only the President and Advisors can invite new members.

Monarchy
0=Monarch
1=Counsil
2=Follower

In a monarchy, only the Monarch can invite new members.

Anarchism
0=Anarchist

An anarchism has 1 leader who is also an "Anarchist" but only this member gets to chose the governing form. It takes 3 members who do /org kick {name} to kick someone from such an org. Everyone in an anarchism can recruit new members.

Feudalism
0=Lord
1=Knight
2=Vassal
3=Peasant

In a feudalism, only the Lord can invite new members.

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Guild Depot
« Reply #3 on: July 07, 2006, 03:47:06 am »
Yes, I know the ranks :P

The problem was figuring out a universal "rank" code.

Members shouldn't be allowed to remove other members, but a General/pres should be.

220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Zimble

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Guild Depot
« Reply #4 on: August 09, 2006, 05:00:09 pm »
Nice mod, Naturalistic
Already wrote a web interface for that.

But while trying to delete items we noticed that members are not able to delete items from the db.

I took a look at the code and noticed that in line 111 in the depot_del function the calling charname is compared with the itemurl stored in the db, instead of the contributorID.
So only admins were able to delete items.

So I increased the index by one:
Code: [Select]
111c111
<             if($result2[0][2]==$name) $candel = true;
---
 >             if($result2[0][3]==$name) $candel = true;


Maybe its just our database and the fields are in a diffrent order but I wanted you to know...
Zimble/RK3

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Guild Depot
« Reply #5 on: August 09, 2006, 05:26:11 pm »
Which version of the bot do you run?

It's working as it should here...I'll take a look into it though.
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Zimble

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Guild Depot
« Reply #6 on: August 09, 2006, 07:01:46 pm »
Thx for the quick response

main.php says $bot_version = "0.3.3";

Don't know, where "our" depot.php is coming from, since I'm not the hoster of the bot

But from what I've seen in depot.php
Code: [Select]
$db -> query("CREATE TABLE IF NOT EXISTS depot
              (id INT(11) NOT NULL PRIMARY KEY, itemName VARCHAR(255), itemURL VARCHAR(255), contributorID VARCHAR(30))");

than $result(0)(2) is indeed the itemURL.
Zimble/RK3

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Guild Depot
« Reply #7 on: August 13, 2006, 06:23:01 pm »
Ah... I added the DB info afterwards.

I probably put them into the wrong order. I'll fix it up, thanks for pointing that out =)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Guild Depot
« Reply #8 on: August 19, 2006, 12:59:46 am »
Handy module but didn't quite do what I'd like so I modified it a bit. Now you can add an item and include a number after it depending on how many you have. Adding 63 of the same item and same ql just seemed ridiculous so you can do !depot add itemref 63. The list will display itemref X63.

Also adding no number just adds 1 to the amount since it's obviously just 1 item.

edit: Removed file as was old version.
« Last Edit: February 05, 2007, 07:25:10 pm by Malosar »
Eternalist
General of The Syndicate

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Guild Depot
« Reply #9 on: August 19, 2006, 07:03:10 am »
Ah, yeah... forgot to add my updated version.

Has the option to choose what org type you are and the 'rank' you want to be able to remove items.

And if there's multiple of the same item but different people, it x# the item, and lists who has it.

Just need to write a post-it for me to remember to upload tomorrow :)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Malosar

  • BeBot Expert
  • ****
  • Posts: 259
  • Karma: +0/-0
    • http://www.lowerdimension.com
Re: Guild Depot
« Reply #10 on: August 19, 2006, 03:33:13 pm »
Very nice, I'll check it out :)
Eternalist
General of The Syndicate

Offline Zimble

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Guild Depot
« Reply #11 on: August 19, 2006, 08:41:16 pm »
Maybe you should add an item-remove link in list/search view to make it easier to remove items:

Code: [Select]
<?php
$stritem 
.= "<font color=#ffff66>#" $val[0] . "</font> - <a href=" $val[2] . ">"$val[1] ."</a>\n[Item holder: " $val[3] . "] [ <a href='chatcmd:///tell <botname> depot del " $val[0] . "'>Remove</a> ]\n\n";
?>


So you no longer need to copy&paste the itemid of the item you want to delete
Zimble/RK3

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Guild Depot
« Reply #12 on: August 20, 2006, 01:38:09 pm »
*pokes naturalistic*

Offline Wolfbiter

  • Contributor
  • *******
  • Posts: 149
  • Karma: +0/-0
    • KAZE
Re: Guild Depot
« Reply #13 on: August 20, 2006, 11:22:07 pm »
No poking of natu without my written expression!
Too many toons.

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Guild Depot
« Reply #14 on: August 25, 2006, 12:38:50 am »
Would be cool to show the QL in the list also, tried to figure it out but too tired :)

-jj-

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 278
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal