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

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

Author Topic: Supplies needed module  (Read 21622 times)

0 Members and 1 Guest are viewing this topic.

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Supplies needed module
« on: July 09, 2008, 03:34:39 am »
Thanks  Vry for fixing my code,  and to Noer for converting the original 4.x KOS module

This module allows the person in charge of managing guild materials to allow the guild to query what materials are needed and for what purpose

NOTE: IF YOU HAVE USED MY OLD SUPPLIES MODULE (Rev 3 or older).  PLEASE PUT THE runmeonce.php file in the modules directory for the next bot load.. then remove it
it deletes the old DB


!supplies =====Display supply list.
!supplies add <material> <amount> <reason> =====Add Material, amount and reason to supplies list.
!supplies givei <itemlink> =====Advertise item to guild";
!supplies givem <material> <amount> =====Advertise materials to guild with available amount.
!supplies change <material> <amount> =====Changes Material amount.
!supplies changemy <material> <amount> =====Changes Players offered Material amount.
!supplies del <material> =====Remove material from supply list.
!supplies delmy <material>=====Removes material or item listing by your character
!supplies delplayer <playername> =====remove all listings by playername

===================================================
Changes
=================================================
Rev1 07/08  Now has option to change material amount 
Rev2 07/10  Gave the ability to deny  add/change/del commands to only certain group members via the !commands all menu.
Rev3 07/11  Changed default permissions from ADMIN to MEMBER.
Rev4 07/12  Added Features for members to add items and materials available to others.
Rev5 07/13  Fixed error in the !supplies player <playername>   command
It should now properly delete the character you are referring to instead of your own.
Rev5a 7/15  Removed reference to kooopatroopa  :) srry
Rev6 7/17 Added Advertisement of supplies needed every hour.  This is changeable on line 47 of the code   (      $this -> register_event('cron', '1hour');    )
if you like to use minutes it would like like           $this -> register_event('cron', '15min');

You can change the permissions per command by running
/tell BOTNAME !commands subs supplies

« Last Edit: July 18, 2008, 04:12:25 am by kardsen »

Offline Vrykolas

  • BeBot Apprentice
  • ***
  • Posts: 100
  • Karma: +0/-0
Re: Need Help *Supplies needed module
« Reply #1 on: July 09, 2008, 12:31:44 pm »
try this (note that I've changed the add to require add in the command):

Code snipped as it's now available in the first post>
« Last Edit: July 12, 2008, 10:55:15 am by Vrykolas »

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Re: Need Help *Supplies needed module
« Reply #2 on: July 09, 2008, 06:42:27 pm »
Man Vrykolas,

Everywhere I go you seem to be there to help out  :)

Thanks again,  worked perfectly.

Offline meatshield

  • BeBot User
  • **
  • Posts: 24
  • Karma: +0/-0
Re: Supplies needed module
« Reply #3 on: July 10, 2008, 07:50:16 pm »
The Bebot team really rocks. I wish companies I paid money to supported their stuff like they do.

Kudos to you Kardsen - I was actually trying to do this module myself, but had trouble getting passed <? ?> :)

Offline Noer

  • BeBot Apprentice
  • ***
  • Posts: 107
  • Karma: +0/-0
Re: Supplies needed module
« Reply #4 on: July 10, 2008, 11:28:27 pm »
The Bebot team really rocks. I wish companies I paid money to supported their stuff like they do.

Kudos to you Kardsen - I was actually trying to do this module myself, but had trouble getting passed <? ?> :)

Thank you very much for the kind words meatshield. :)

And very nice module kardsen.

Offline scape

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Supplies needed module
« Reply #5 on: July 11, 2008, 12:22:13 am »
Id love an option to be able to do as an example "!supplies add YEW 100 Guild city" and then "!supplies del YEW 35" and have it remove 35 from the 100 instead of deleting it all.

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Re: Supplies needed module
« Reply #6 on: July 11, 2008, 02:15:38 am »
hrmm,

Your asking the wrong guy lol. My php skills are not that good to create math with the module :)

I could probably pull of a


!supplies change Yew 65

and have it change the amount to 65

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Re: Supplies needed module
« Reply #7 on: July 11, 2008, 03:23:14 am »
change made. See First post for DL.

Offline scape

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Supplies needed module
« Reply #8 on: July 11, 2008, 10:13:16 am »
Thanks alot :) thats brilliant and will serve my purpose !

But would it be a far stretch to allow adding of items as well so that people can offer special items or stacks of resources that may not be currently requested ?
« Last Edit: July 11, 2008, 05:36:57 pm by scape »

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Re: Supplies needed module
« Reply #9 on: July 11, 2008, 10:10:40 pm »
This is what I am working on per user suggestion...
I hope to have it done by today....
Please keep in mind,  I am by no means a php expert.. So my code may not be the best way of doing things.
Feel free to correct my code and give feedback.

!supplies Display supply list
!supplies add <material> <amount> <reason> add a requested material and amount
!supplies givei itemlink add a item you are offering to the guild
!supplies givem material amount add material and amount you are offering to the guild
!supplies change material amount change amount of a material the guild needs
!supplies changem material amountChanges Players offered Material amount.
!supplies del material Remove material from supply list.
!supplies delmine Removes all listing by your character
!supplies delplayer playername remove all listings by playername


Thats alot of commands..... But it keeps the items offered, materials offered, and mats needed separate.
This module was originally meant as a way for the guild members to know what mats the guild needed for the next city building, ect...  but I guess it's taking on a life of its own.

Also.  I will try to set up each command with its own permissions... 
using the /tell BOTNAME !commands subs supplies command

Offline scape

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Supplies needed module
« Reply #10 on: July 12, 2008, 09:50:50 pm »
Sounds great, yeah it is taking a life of its own it contains the basics for so many different uses, thanks alot for your effort :)

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Re: Supplies needed module
« Reply #11 on: July 12, 2008, 11:24:18 pm »
Still working on this.

Having trouble with the handling of the item links.

I have a post in the support forums,  here's hoping someone can show me my error.

Offline kardsen

  • BeBot Apprentice
  • ***
  • Posts: 81
  • Karma: +0/-0
Re: Supplies needed module
« Reply #12 on: July 13, 2008, 03:24:40 am »
Finished!   

NOTE:  IF YOU HAVE USED MY OLD SUPPLIES MODULE.  PLEASE PUT THE runmeonce.php file in the modules directory for the next bot load.. then remove it
it deletes the old DB

        !supplies =====Display supply list.
   !supplies add <material> <amount> <reason> =====Add Material, amount and reason to supplies list.
   !supplies givei <itemlink> =====Advertise item to guild";
   !supplies givem <material> <amount> =====Advertise materials to guild with available amount.
   !supplies change <material> <amount> =====Changes Material amount.
   !supplies changemy <material> <amount> =====Changes Players offered Material amount.
   !supplies del <material> =====Remove material from supply list.
   !supplies delmy <material>=====Removes material listing by your character
   !supplies delplayer <playername> =====remove all listings by playername

Offline Vain

  • BeBot User
  • **
  • Posts: 57
  • Karma: +0/-0
Re: Supplies needed module
« Reply #13 on: July 16, 2008, 08:52:34 am »
Would it be hard to code an option to have the bot display the supplies needed in gc on a specified timer?

Offline Banshee

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Supplies needed module
« Reply #14 on: July 16, 2008, 05:11:53 pm »
Hia!

Im a bit new to this php and bot thingie but......

I got the bot up and running (Brilliant work guys!)

Where do i edit the text in the window after doing a /Tell bot !supplies (Koopatroopa, is surley a very nice guy but sending all our mats to him might not be an option at this point  ;D)

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


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 ]

* Who's Online
  • Dot Guests: 290
  • 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