Iyouboushi   -  Feb 16, 2017

Hello everyone. Everyone who knows me knows that I'm big into programming various mIRC RPG bots. My current, and largest, Battle Arena (https://github.com/Iyouboushi/mIRC-BattleArena) is still going strong but I feel like it's reaching the end of its life in the way it is currently coded. Briefly I'll just say that everything is pretty static. There are pre-made weapons/items/equipment and while I could continue to add more manually I'm starting to think about the future.

I'm thinking of trying to make a Diablo style RPG bot where weapons and armor are randomly generated and dropped by the enemies. My problem is trying to figure out a good way of doing this. I feel like I could have templates and have the bot randomly pick a template and fill in various values based on the level of the player or the level of the battle but I feel like an armor/weapons database or player's character sheets would become really clogged over time. Not to mention there'd be a chance that the bot would randomly pick the same name and overwrite something.

The point of this thread is just to ask other mIRC scripters out there what kind of approach they would take to program something like this in mIRC. Any suggestions/ideas?

SykO  -  Mar 10, 2017

You can use unique IDs to store data instead of the name of the item, that way there wouldn't be a problem of overwriting.

Iyouboushi  -  Mar 18, 2017

Yo. I saw you had stopped by BA on esper. I'm pretty busy and rarely on IRC these days (mainly keep it on to log the channel in case something comes up with the bot).

Unique IDs would be the best way to go but it would pose problems, I think, for trying to equip things. Maybe you could elaborate?

SykO  -  Mar 20, 2017

I am currently creating my own RPG "engine". It currently holds data in hash tables and saves them as files when not in use. I made it inspired in object oriented programming. So I have a hash table of player, in it I can add characters to that player like so: ADD PLAYER_DATABASE CHARACTER_NAME CHARACTER_DATABASE_NAME. As you can tell the character also has its own hash table. Those are easy because each character must have a unique name, but as you know a character can hold multiple items (weapons, armor, potions,....) at one time and these items may have the same name so you can't just add them to the character with a name so instead I use an id. In my table I have a item with the name current_item_id, when it is time to add an item I simply increment this id and add the item like so: ADD CHARACTERDATABASE ITEM"CURRENT_ITEM_ID" ITEM_TABLE_NAME. Of course in code it looks different but that is the idea. Hope this helps.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.