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

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

Author Topic: Guild Items  (Read 20329 times)

0 Members and 1 Guest are viewing this topic.

Offline durroch

  • BeBot User
  • **
  • Posts: 43
  • Karma: +0/-0
Guild Items
« on: July 25, 2008, 04:24:32 am »
Greetings,

I've put together a module that helps your guild keep track of what items the guild currently owns.  It will show a list of every item in stock so your members can see what the guild currently has.  If an item is currently out of stock it will not be shown on the list.  If an item is out of stock but is loaned to someone, it will show it on the list but tell the person looking that it's currently loaned out. I will be adding screen shots as soon as my guild gets all our items propagated into the database.

This is my very first module so if some of you guru's out there want to give me some pointers, drop me a PM or reply to this post :).  Also if anyone would like a feature tweaked or added, let me know.

When I mention <itemlink> it means to drag an item to the chat and drop it in.

Working On
-[ Done ] Sprucing up the code
-[ Done ] Adding colors to each item listed (i.e. grey, green, blue, purple)
-[ Done ] Add a function to show all items that have been 'Given' and 'Loaned' because you are not always going to have the item in your inventory to do !gitems history item <itemlink> and you're not always going to remember who has what using the !gitems history member <Name> command.

Screen Shots
List of Items (Page 1 of 4) - Note: The [ Delete ] button will not be there when someone lower than Admin uses the !gitems command.


List of Items (Page 2 of 4) - Note: The [ Delete ] button will not be there when someone lower than Admin uses the !gitems command.


History of a Member (Durroch)


History of an Item (Clan Gaud Chestguard)


Below is quoted from the bots help command:
Quote
::::: HELP ON GITEMS :::::

Keeps track of what items the Guild currently owns and also what the guild has loaned out or given to its members

 !gitems - Shows a list of all the items the Guild owns.
 !gitems add <qty> <category1> <category2> <itemlink> - Adds an item to the list.
 !gitems give <member> <qty> <itemlink> - Permanently gives an item to a Guild Member and records it in the transaction history of said Member.
 !gitems loan <member> <qty> <itemlink> - Loans an item to a Guild Member and records it in the transaction history of said Member.
 !gitems update add <qty> <itemlink> - Adds <qty> to the current stock of the specified item.
 !gitems update rem <qty> <itemlink> - Subtracts <qty> from the current stock of the specified item.
 !gitems history member <member> - Gives you a transaction history of all items given or loaned to <member>, as well as items checked back in.
 !gitems history item <itemlink> - Gives you a transaction history of loans and who's been given the specified item.
 !gitems history all - Gives you a transaction history every item every loaned or given.

NOTES:
Created by Durroch - Invictrum Guild Leader - US-Derketo
When using the Add sub-command to add an item (i.e. !gitems add 1 Armor Heavy <itemlink>) to the Guild Items list please use the following categories:
Armor Cloth
Armor Silk
Armor Light
Armor Medium
Armor Heavy
Armor Plate
Armor Shields
Armor Back
Weapons 1HE
Weapons 2HE
Weapons 1HB
Weapons 2HB
Weapons Daggers
Weapons Polearms
Weapons Staves
Weapons Bows
Weapons Arrows
Weapons Crossbows
Weapons Bolts
Weapons Thrown
Misc Necklaces
Misc Rings
Misc Talismans
Potions Mana
Potions Stamina
Potions Health
Gems Rhombic
Gems Trillion
Gems Oval
Gems Teardrop
Gems Oblique
Gems Cabochon
« Last Edit: July 27, 2008, 06:08:40 am by durroch »

Offline Roath

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Guild Items
« Reply #1 on: July 25, 2008, 01:30:05 pm »
what about tradeskill resources? would be nice to be able to add, for example resources for the guildcity, alchemy or similar

Offline Organizer

  • BeBot Apprentice
  • ***
  • Posts: 135
  • Karma: +0/-0
Re: Guild Items
« Reply #2 on: July 25, 2008, 02:04:13 pm »
Quote
what about tradeskill resources? would be nice to be able to add, for example resources for the guildcity, alchemy or similar

He left that out on purpose as we have mods like the !city guild management module to take care of such a resource list...

Offline Loden

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Guild Items
« Reply #3 on: July 25, 2008, 09:13:24 pm »
Good work Durroch

Very well done.  Are you doing ok with quality recognition?  Looks like items has something in there for that.  I'm working on adding an item request link, allowing members to add/delete their names from the record as an interested party and allowing folks with proper premissions to raffle it for the interested parties.

Sounds like a bit much but you've got a great template here to work from.  Much further along than I was.

I'll give you my results if you haven't already coded something similar when I'm done.


Offline durroch

  • BeBot User
  • **
  • Posts: 43
  • Karma: +0/-0
Re: Guild Items
« Reply #4 on: July 25, 2008, 11:48:03 pm »
Thank you, I appreciate that :).
I believe there's already a raffle function in the bot so I'm not too keen to reinvent the wheel. 
Yes, I used the code from Items.php that already figured out how to extract the QL, Name, ItemID, and Color :).  This weekend, my guild will be propagating this module so I will take screen shots after it's done :).

Offline Loden

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Guild Items
« Reply #5 on: July 25, 2008, 11:55:37 pm »
Yeah, I was simply going to add a link that made use of the current raffle functionality.

I was looking through it and I see you're already capturing additional information like colors and such but just haven't wired it up yet.  No problem at all 8)

Once I get the request feature taken care of, I'll give the additions to look over incase you want to include them in your workk.  Again very nice job and I'm happy you beat me to the punch.  I get more time to spend Farming... wait... >.>
« Last Edit: July 25, 2008, 11:57:14 pm by Loden »

Offline durroch

  • BeBot User
  • **
  • Posts: 43
  • Karma: +0/-0
Re: Guild Items
« Reply #6 on: July 26, 2008, 02:47:32 am »
Ya, I'm not sure how to use the chatcmd() tool and make the items different colors.

Code: [Select]
$itemlink = $this -> bot -> core("tools") -> chatcmd("item $items[item_id]", "##gitems_color##$items[item_name]##end##");&
Code: [Select]
$itemlink = $this -> bot -> core("tools") -> chatcmd("item $items[item_id]", "<font color='COLOR'>$items[item_name]</font>");
Both do not work.  It still produces an orange link.  I'm guessing I'll have to forgo using the chatcmd() tool and build the links myself.  Anyone got any hints or a standard way of doing it besides chatcmd()?

And ya, I'd like to take a look at your code once you've done your thing :).  Not sure how using the raffle command will work.  That seems to me that it will make this module more of a "real-time" application when it's not.  Meaning your guild is on a raid and an item comes up that you need to raffle off.  It would be redundent to put into the Guild Items system just so people can click on a link that raffles off the item.  Just skip using this module and raffle it off regularly.  This module is just more for keeping track of what the guild owns and who's got what loaned out to them as well as all the items been given out.
« Last Edit: July 26, 2008, 02:57:32 am by durroch »

Offline durroch

  • BeBot User
  • **
  • Posts: 43
  • Karma: +0/-0
Re: Guild Items
« Reply #7 on: July 26, 2008, 08:52:43 am »
Fixed a couple bugs and add two new categories to the list, "Armor Back" and "Armor Silk".  Please update to newest code if you are using this.

Also to get the two new categories you'll either have to delete the "guild_items" table and restart the bot or go in and add the two new categories to "item_cat" field.

Offline durroch

  • BeBot User
  • **
  • Posts: 43
  • Karma: +0/-0
Re: Guild Items
« Reply #8 on: July 27, 2008, 06:10:39 am »
Updated the code to v1.2.  This fixed some bugs and also added the colors to the items.  I also cut out a lot of unnecessary code as well.  I've updated the first post with screenshots too.  Let me know if there's anything else you'd like to see in this module.

Offline krowe

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Guild Items
« Reply #9 on: July 30, 2008, 04:17:53 pm »
Having a bit of trouble with this one for some reason, extracted mod to custom mods and ran it.  Can add items without a problem and get a message back thanking me for doing so, hoever when i ask the bot !gitems i get a reply of 'There are currently no guild items'

Any ideas?

Offline durroch

  • BeBot User
  • **
  • Posts: 43
  • Karma: +0/-0
Re: Guild Items
« Reply #10 on: July 30, 2008, 04:46:42 pm »
hmm....is there a way you could show me what's happening in the console window of the bot when you add an item?  I'm guessing there's an error somewhere and it's not being added but saying it is anyways.

Offline krowe

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Guild Items
« Reply #11 on: July 30, 2008, 05:02:48 pm »
Hmm never thought of checking the log but i only have limited knowledge of this but it looks like a mysql error?

Aocbot [TELL]   [INC]   Krowe: !gitems add 1 Weapons 2HB <a style="text-decorati
on:none" href="itemref://3806481/3806481/77/b22339fb:b271aa20:4091a21d:fede9951/
b22339fb:b271aa20:4091a21d:fede9951">[Maul of the Stars][/link]
MySQL error (# 0) on query: INSERT INTO guild_items (item_id, item_name, item_co
lor, item_ql, item_stock, item_cat) VALUES ('3806481', 'Maul of the Stars', 'be0
0be', '77', '1', 'Weapons 2HB')
Field 'item_loaned' doesn't have a default value
Aocbot [TELL]   [OUT]   -> Krowe: Thank you Krowe, <a style="text-decoration:non
e" href="itemref://3806481/3806481/77/b22339fb:b271aa20:4091a21d:fede9951/b22339
fb:b271aa20:4091a21d:fede9951">[Maul of the Stars][/link] was added to Guild Ite
ms list.
Aocbot [TELL]   [INC]   Krowe: !gitems
Aocbot [TELL]   [OUT]   -> Krowe: There are currently no Guild Items.

Offline durroch

  • BeBot User
  • **
  • Posts: 43
  • Karma: +0/-0
Re: Guild Items
« Reply #12 on: July 30, 2008, 05:21:36 pm »
hmm, weird.  Do you know how to alter a table in phpmyadmin or whatever program you are using to manage your MySQL database?  If so, go into the guild_items table and change the item_loaned field to have a default value of 0 and I think that should fix your problem.  I'm not sure why you are having problems as I never did and I'm pretty sure the other people who have used this aren't as well since no one has said anything.  It might be the way your mysql is installed *shrugs*. 

Offline chamoul

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Guild Items
« Reply #13 on: July 30, 2008, 06:38:32 pm »
the bank is so small, that we can't stock everything inside. So actually we use some player to stock items. My question is : is-there anyway to add in this module an option to show the character names of who have the items in the stock


thank you

Offline durroch

  • BeBot User
  • **
  • Posts: 43
  • Karma: +0/-0
Re: Guild Items
« Reply #14 on: July 31, 2008, 09:19:10 am »
Ya, we do the same thing, only one of my resource officers is in-charge of collecting all the items and she has them all on one character.  Although that is a good feature to have.  It will just have to be one more thing you'll have to type in when adding an item.  like
!gitems add 1 Armor Heavy Name <itemlink>

I'll try to have this implemented after the weekend. I'm busy busy busy with freelance work heh.

 

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


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 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: 495
  • 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