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: Guides Module  (Read 11328 times)

0 Members and 1 Guest are viewing this topic.

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Guides Module
« on: August 22, 2007, 10:16:13 am »
Would anyone have a updated guides module for .4.1 bebot. I have old version but seems once you change access lvl it no longer shows txt files. Thanks

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Re: Guides Module
« Reply #1 on: August 22, 2007, 08:19:15 pm »
I had just thought about doing this last night, so since someone else wanted it, I did it today ;)

I changed the way it works a bit though:
1) Now, if you want to modify the main menu, you don't have to modify the .PHP file or restart the bot. The main menu is stored in the guides folder in a file called guide.lst.
2) All guides are now stored in a folder under the main BeBot folder called guides. (for example: C:\BeBot\guides)
3) Guides are called up by the filename, not a number. So, !guide blah would read in blah.txt from the guides folder and show it to the user. For security, only a-z and 0-9 are allowed in the filename (preventing people from directory hopping to grab other text files on your system).
4) The !guide view <blah> command is shortened to !guide <blah>.

As always, let me know if there are problems.

22-Aug-2007: Fixed security problem noted by guild-mates.
« Last Edit: August 22, 2007, 09:37:32 pm by Sabkor »

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Re: Guides Module
« Reply #2 on: August 22, 2007, 08:33:21 pm »
Thanks a bunch. One question is the guides.lst made by the php file or where does it come from ?

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Re: Guides Module
« Reply #3 on: August 22, 2007, 09:13:58 pm »
You can create it however you like (you can add your own links, etc to it). If you want just the default that was in there from before, copy and paste the menu lines from the old .php file that you have into that file and remove the $content .= "  and ";   portions of the lines. (If you want, you can PM me the old guides.php file you are using here, and I can send you back the guides.lst file that you will need)

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Re: Guides Module
« Reply #4 on: August 22, 2007, 09:20:37 pm »
Ok got the .lst file made and it works but when click on the links it says guide not found. The txt files i have are named guideagility.txt If i do guide guideagility it brings it up ok just wont find file if using the link in guides.

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Re: Guides Module
« Reply #5 on: August 22, 2007, 09:36:05 pm »
I found a bug in my code as well... line 37 sets default security, but since I forgot to modify the code that I copied, it sets default security for the online command   ;)

If you want to modify it yourself, change the 3 lines to the following:

Code: [Select]
$this -> bot -> accesscontrol -> create("tell", "guides", "GUEST");
$this -> bot -> accesscontrol -> create("gc", "guides", "GUEST");
$this -> bot -> accesscontrol -> create("pgmsg", "guides", "GUEST");
$this -> bot -> accesscontrol -> create("tell", "guide", "GUEST");
$this -> bot -> accesscontrol -> create("gc", "guide", "GUEST");
$this -> bot -> accesscontrol -> create("pgmsg", "guide", "GUEST");


For your .lst file, have a line like the following and it will work:

<a href='chatcmd:///tell <botname> <pre>guide guideagility'>Agility Guide</a>

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Re: Guides Module
« Reply #6 on: August 22, 2007, 09:44:31 pm »
When i look at the console from clicking on link to guide it says cannot find <guides/view.txt> So it not pointing to the guides i dont think not sure what view.txt would come from?

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Re: Guides Module
« Reply #7 on: August 22, 2007, 09:53:45 pm »
Ah yes, I should have added that to my steps for you above. The previous module had a redundant "view" command attached. Modify your .lst file to remove 'view' from all the lines (such as "<pre>guide view guideagility" becomes "<pre>guide guideagility").

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Re: Guides Module
« Reply #8 on: August 22, 2007, 09:55:10 pm »
Ok yea found it also changed on the file directory to look for guide prefix for file name and everything started working. Thanks for help.

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Re: Guides Module
« Reply #9 on: August 23, 2007, 12:38:53 am »
Now when a member tried to use this it shows the guides but doesnt show when you click on link all it says if /tell orderbot help in tell msg. Ive set access lvl to guest but seems its not allowing access to the guides links.

Offline Sabkor

  • Contributor
  • *******
  • Posts: 30
  • Karma: +0/-0
Re: Guides Module
« Reply #10 on: August 23, 2007, 01:09:29 am »
You have to ensure to set access level to guest on both the commands: guides and guide

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Re: Guides Module
« Reply #11 on: August 23, 2007, 01:20:25 am »
They are both set to guest. It allows the owner to do it but no other admin or members can use the links.

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Re: Guides Module
« Reply #12 on: August 23, 2007, 01:24:53 am »
Its working now had to set commands in tell to member also.

Offline Sorekill

  • BeBot Rookie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Guides Module
« Reply #13 on: August 24, 2007, 01:35:31 am »
Can someone post what the guides.lst file should look like.

When u mention copy the old php file over I am lost since I never had it ;P

Offline Diablo

  • BeBot User
  • **
  • Posts: 67
  • Karma: +0/-0
Re: Guides Module
« Reply #14 on: August 24, 2007, 07:46:55 am »
This is pretty much what is should look like just shows the menus:

Code: [Select]
General guides:
<a href='chatcmd:///tell <botname> <pre>guide 3'>LINK</a> Official Code Of Conduct
<a href='chatcmd:///tell <botname> <pre>guide 6'>LINK</a> Beginners Questions
<a href='chatcmd:///tell <botname> <pre>guide 9'>LINK</a> Guide to AO terminology
<a href='chatcmd:///tell <botname> <pre>guide 8'>LINK</a> Locations on Rubi KA
<a href='chatcmd:///tell <botname> <pre>guide 4'>LINK</a> Wrangles
<a href='chatcmd:///tell <botname> <pre>guide 5'>LINK</a> Farming Credits
<a href='chatcmd:///tell <botname> <pre>guide 7'>LINK</a> Blitzing
<a href='chatcmd:///tell <botname> <pre>guide 50'>LINK</a> RK Mission Settings
<a href='chatcmd:///tell <botname> <pre>guide 10'>LINK</a> The Grid
<a href='chatcmd:///tell <botname> <pre>guide 11'>LINK</a> IP Resets
<a href='chatcmd:///tell <botname> <pre>guide 15'>LINK</a> Buffs
<a href='chatcmd:///tell <botname> <pre>guide 17'>LINK</a> Armour
<a href='chatcmd:///tell <botname> <pre>guide 36'>LINK</a> Rubi-Ka's Little Instruction Book
<a href='chatcmd:///tell <botname> <pre>guide 37'>LINK</a> Implants
<a href='chatcmd:///tell <botname> <pre>guide 69'>LINK</a> Perennium Weapons

Location guides:
<a href='chatcmd:///tell <botname> <pre>guide 12'>LINK</a> Smuggler's Den
<a href='chatcmd:///tell <botname> <pre>guide 14'>LINK</a> Temple Of Three Winds
<a href='chatcmd:///tell <botname> <pre>guide 16'>LINK</a> Biomare Dungeon
<a href='chatcmd:///tell <botname> <pre>guide 38'>LINK</a> Hollow Island
<a href='chatcmd:///tell <botname> <pre>guide 40'>LINK</a> Steps Of Madness
<a href='chatcmd:///tell <botname> <pre>guide 41'>LINK</a> Inner Sanctum
<a href='chatcmd:///tell <botname> <pre>guide 42'>LINK</a> The Crypt Of Home

Profession guides:
<a href='chatcmd:///tell <botname> <pre>guide 18'>LINK</a> Adventurer
<a href='chatcmd:///tell <botname> <pre>guide 19'>LINK</a> Agent
<a href='chatcmd:///tell <botname> <pre>guide 20'>LINK</a> Doctor
<a href='chatcmd:///tell <botname> <pre>guide 21'>LINK</a> Bureaucrat
<a href='chatcmd:///tell <botname> <pre>guide 22'>LINK</a> Soldier
<a href='chatcmd:///tell <botname> <pre>guide 23'>LINK</a> Engineer
<a href='chatcmd:///tell <botname> <pre>guide 24'>LINK</a> Fixer
<a href='chatcmd:///tell <botname> <pre>guide 25'>LINK</a> Martial Artist
<a href='chatcmd:///tell <botname> <pre>guide 26'>LINK</a> Meta Physicist
<a href='chatcmd:///tell <botname> <pre>guide 27'>LINK</a> Trader
<a href='chatcmd:///tell <botname> <pre>guide 28'>LINK</a> Nano Technician

Shopping guides:
<a href='chatcmd:///tell <botname> <pre>guide 31'>LINK</a> Fixer Shop
<a href='chatcmd:///tell <botname> <pre>guide 32'>LINK</a> Thin Bertice
<a href='chatcmd:///tell <botname> <pre>guide 33'>LINK</a> Trader Shop
<a href='chatcmd:///tell <botname> <pre>guide 34'>LINK</a> Zoftig Blimp
<a href='chatcmd:///tell <botname> <pre>guide 35'>LINK</a> Tsunayoshi Smith

Quest Guides:
<a href='chatcmd:///tell <botname> <pre>guide 44'>LINK</a> Shoulderpad Quest Part 1
<a href='chatcmd:///tell <botname> <pre>guide 45'>LINK</a> Shoulderpad Quest Part 2
<a href='chatcmd:///tell <botname> <pre>guide 46'>LINK</a> Shoulderpad Quest Part 3
<a href='chatcmd:///tell <botname> <pre>guide 47'>LINK</a> OT Tailor Quest
<a href='chatcmd:///tell <botname> <pre>guide 48'>LINK</a> Fixer Grid Quest Part 1
<a href='chatcmd:///tell <botname> <pre>guide 49'>LINK</a> Fixer Grid Quest Part 2
<a href='chatcmd:///tell <botname> <pre>guide 52'>LINK</a> Compact Disc Quest

SL Nano Guides:
<a href='chatcmd:///tell <botname> <pre>guide 53'>LINK</a> Nansense Garden Nanos
<a href='chatcmd:///tell <botname> <pre>guide 54'>LINK</a> Elysium Garden Nanos
<a href='chatcmd:///tell <botname> <pre>guide 67'>LINK</a> Elysium Sanctuary Nanos
<a href='chatcmd:///tell <botname> <pre>guide 56'>LINK</a> Schoel Garden Nanos
<a href='chatcmd:///tell <botname> <pre>guide 57'>LINK</a> Schoel Sanctuary Nanos
<a href='chatcmd:///tell <botname> <pre>guide 58'>LINK</a> Adonis Garden Nanos
<a href='chatcmd:///tell <botname> <pre>guide 59'>LINK</a> Adonis Sanctuary Nanos
<a href='chatcmd:///tell <botname> <pre>guide 60'>LINK</a> Penumbra Garden Nanos
<a href='chatcmd:///tell <botname> <pre>guide 61'>LINK</a> Penumbra Sanctuary Nanos
<a href='chatcmd:///tell <botname> <pre>guide 62'>LINK</a> Inferno Garden Nanos
<a href='chatcmd:///tell <botname> <pre>guide 63'>LINK</a> Inferno Sanctuary Nanos
<a href='chatcmd:///tell <botname> <pre>guide 64'>LINK</a> Pandemonium Garden Nanos

SL Garden Key Guides:
<a href='chatcmd:///tell <botname> <pre>guide 65'>LINK</a> Nansense Garden Key - Omni
<a href='chatcmd:///tell <botname> <pre>guide 66'>LINK</a> Elysium Garden Key - Omni
<a href='chatcmd:///tell <botname> <pre>guide 29'>LINK</a> Elysium Sanctuary Key - Omni
<a href='chatcmd:///tell <botname> <pre>guide 68'>LINK</a> Schoel Garden Key - Omni

Jobe Armour Guides:
<a href='chatcmd:///tell <botname> <pre>guide 70'>LINK</a> Jobe Armour Guide
<a href='chatcmd:///tell <botname> <pre>guide 71'>LINK</a> Tier 1 Armour Guide
<a href='chatcmd:///tell <botname> <pre>guide 72'>LINK</a> Tier 2 Armour Guide
<a href='chatcmd:///tell <botname> <pre>guide 73'>LINK</a> Tier 3 Armour Guide

Placeholders:
<a href='chatcmd:///tell <botname> <pre>guide 1'>LINK</a> Shiz
<a href='chatcmd:///tell <botname> <pre>guide 2'>LINK</a> Shiz
<a href='chatcmd:///tell <botname> <pre>guide 13'>LINK</a> Shiz
<a href='chatcmd:///tell <botname> <pre>guide 30'>LINK</a> Shiz
<a href='chatcmd:///tell <botname> <pre>guide 39'>LINK</a> Shiz

 

* 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: 509
  • 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