Bear's BBS

A crappy site for the most advance mud board.

  • Home
  • Maps
  • Files
  • Forums
    • Forum
    • Old Forums
  • Newbie Guide
    • Newbie Guide
    • Levels 15-20:
    • Levels 20-30:
    • Levels 30-40:
    • Levels 40-50:
    • Levels 50-60:
    • Levels 60-70:
    • Levels 70-80:
    • Trainers
    • Mudrev quests
    • MudRev FAQ
    • MegaMud Commands
    • Edited Abil Flags
  • Rules
  • WebChat
  • Users

Maptools HP webpage

This pack of macros and webpages will allow for tracking of hps and tokens through a website. With this system the webpage becomes the authority on hps. It allows players to pull up a website on their smart device and update their or their party members hps and to view the hps of the current mobs. The GM page will allow the GM to update any tracked tokens hps players and mobs. The actual values are displayed just percentages.

FILES: (download here)
First you need to download the pack of files. In the pack you will find 4 php files, api.php(for macros), players.php(for players), gm.php(for gm), and functions.php(the real code). You need to place these on a web server and note the address. In my example my server address will be 192.168.1.25, and path with be /dnd.

The last file is Lib-Webhost.rptok, this is the token file with the macros.  More on this later.

WEB:
there is a couple lines you will need to change to make it work for your environment. Both lines are in functions.php.

First we need to set our players names so the pages know to separate them. and allow players to edit the values. Change the names to match the names on the tokens for your players. The digit following the name is not important just some value will do. Format: “player name” => “10”
So if you want to add players with the names Bob, Bill, Jill, Janet, Thor the Destroyer.
Change this line:
$kwnplrs=array(“Blint”=>”10”, “Silom”=>”10”, “Enna”=>”10”, “RedClaw”=>”10”, “Goujin”=>”10”);
To:
$kwnplrs=array(“Bob”=>”10”, “Bill”=>”10”, “Jill”=>”10”, “Janet”=>”10”, “Thor the Destroyer”=>”10″);

Then the second line to change if you need or want to is for the data file it keeps. The webserver needs the permissions to write to this folder.
So if you want to change this to c:\temp.
Change this line:
$filename=”/tmp/mobs.txt”;
To:
$filename=”c:\temp\mobs.txt”;

That’s it for the web.

MAPTOOLS:
You will need a couple campaign settings setup for the macros to work and display the hps.

First in edit/Campaign Properties/Token Properties
Choose your campaign settings you want to edit or create a new set(click “new” button).
You will need two properties here.
“HitPoints (HP)” and “MaxHP”

Next in Campaign Properties, choose Bars.
Create a bar named “HitPoints” and in “Show To:” select GM, Owner, and Everybody Else. Rest of the settings are up to you.

Now in Campaign Properties, choose States.
You will need to create two States. They are called “Bloodied” and “Dead”. You can assign images and the like to this but they need to exists.

Under the token properties you need to assign a couple of properties set.
Under Properties tab, you need to create a value for “HitPoints” and “MaxHP”. You will also need to assign the value for the player/mob it represents.
Also in the token properties select “State” tab uncheck the hide button on the “HitPoints” bar.

This will have to be done for every token used. I have a macro for when I create a new token it asks it’s MaxHP and few other things for my campaign.

MACROS:
After web is setup drag and drop Lib-Webhost.rptok token file onto a map in the campaign.  At this point you need to save and reload your campaign to set the restApi function.
Highlight Lib-Webhost token and open the selection window.
Click “Set Server address” under settings section. Enter your webserver address and path to files. For me it would be “192.168.1.125/dnd”.
At this point you can create your own macros using restApi() function(explained below). Or use the included macros.
To use the included macros copy the macros under web to your campaign macro windows. Select a token and click away.

Add:
This is the macro to add selected token(s) to the pool of tokens to be monitored.

Delete:
This will remove selected token(s) that are set to NPC. (This will also remove them from the playing field, if you don’t want this to happen remove line 28 for api macro.)

Adjust:
This allows you to adjust the hps of the selected token(s). Negative number to remove, positive will add.

Reset:
This will remove all know info of tracked tokens. Will blank the file that stores the mobs.

Update:
This will take the info from the website and update tokens in the playing field. I have this set to my next init macro, so when I switch init to the next token it will also update all tracked token hps and health bars.

FUNCTION restApi()
This function takes minimum of one argument and that is always which action. Some require a token id as the second. The action is the same as above.
Add:
restApi(“add”,tokenid)

Delete:
restApi(“delete”,tokenid)

Adjust:
restApi(“adjust”,tokenid,amount)

Reset:
restApi(“reset”)

Update:
restApi(“update”)

  • Address

    Telnet: bbs.bearfather.net
  • Categories

    • Info
    • Items
    • Maps
    • Paths
    • Uncategorized
  • Recent Posts

    • New Auto ban system.
    • X-mas Mob Hunt
    • New mod in the works!
    • IT’S WORKING IT’S WORKING!!!
    • We have started one
  • Ads: I like money.

    Ad Blocking Detector

    I have noticed you had ad blocker running. And I would love for you to disable it so I can try to pay for the hosting.

  • Look for….

  • Amazon Link More
  • Donate

    Got a buck?

  • Donate Monthly

    Support Bear's BBS on Patreon!
  • Old Shit

    • January 2021
    • December 2020
    • November 2020
    • May 2020
    • December 2019
    • September 2019
    • July 2019
    • May 2019
    • November 2018
    • September 2018
    • August 2018
    • May 2018
    • April 2018
    • March 2018
    • December 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • August 2016
    • July 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
    • October 2014
    • September 2014
    • August 2014
    • July 2014
    • May 2014
    • April 2014
  • Meta

    • Entries RSS
    • Comments RSS
    • Forums
From the mind of BearFather.

Proudly powered by WordPress Theme: Parament by Automattic.

Advertisment ad adsense adlogger