Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. I got the class files done for two "Main Item Types". Just to lay the foundation down to mark the features done that's already started. When creating a item type it will inherit the properties from the main type choose. Weapon/Armours add bonus to attacks and defense. HealthBonus will be next easy main easy item to create. Then certain item boost types will be created. If anyone got any suggestions for item types, reply. I decided to use in interface instead of main class interface ItemType { public function __construct($data = array()); public function getID(); public function getValue(); public function getName(); public function getPrice(); //return results or msg or whatevee you like, if type different from weapon, armour. public function useIT(); } <?php class Weapon implements ItemType{ public $desc = "increases attack power"; public $itemType = "Weapon"; public $itemID = null; public $name = null; public $value = 0; public $price = 0; //pass any data needed for item type to be used. public function __construct($data = array()) { $this->itemID = $data['id']; $this->name = $data['name']; $this->value = $data['value']; $this->price = $data['price']; } public function getID(){ return $this->itemID; } public function getValue(){ return $this->value; } public function getName(){ return $this->name; } public function getPrice(){ } //returns value. public function useIT(){ //was testing to see if could access properties global $db, $user; $user = new user(1, false); $user->set("US_money", $user->user->info->US_money + 10000); return $this->value; } } Items should be as simple as when pulling from DB. //Creating any item $item = new $rec->parentName($rec->data); //Def/attack $value .= $item->getValue(); //Or if want to return value in iseIt $value .= $item->useIt(); //Or action items, refill Health, action points, revive, ECT. $item->useIt(); Edit: easier reading Edit: and yes still coding on phone πŸ™‚
  3. Today
  4. πŸ˜„ missed GL engine been working with a client for his theses , havent touch GL in a week or more, didnt finish the trading system, nor my inv system 😞 wish i get back to my own work fast
  5. LoL.. no, but I have access to our private messages. Nah. J/K.. this is a lot of the stuff I had coded for oRPG Creator. Maybe we should just team up? I know yo can design πŸ™‚ And when I code something I make sure it's not half ass. If yo leave any features out, yo have to go back and redesign it most likely. Might as well do it right the first time. My first few mods was buggy upon release. Not anymore. Coding is like riding a bike. LoL Also, the way GL is. Isn't there anyway to include a real fight system.
  6. @Sim are you in any way have access to my trello todolist??? xD
  7. Yesterday
  8. padre

    Timers

    the health bar is inaccurate as it pulls from two tables (rank and userstats). As I want to make that upgrade able i'm thinking I might just make a new field for userstats for maxhealth. I love your code there sim that is something I'm going to add in (you may have written it for me lol). I now need to work out (if someone knows please tell me) how to reduce time in hospital using an item or revive button that costs energy or money. With that I need to cut off pages from being accessible while in jail and hospital.
  9. SeeI know I mentioned a new item system, so here's some previews as well as a complete list of what my plan is on this new item/inventory system. The hardest part of the item system is done for the most part. The relationships between item types and slots since multiplier selections can be selected at once. Updating was a pain in the DB. Item Types: You can create item types based on the 3 basic item types I have created thus far. Weapon, Armour, health (like health potion). More can be added from a itemType class file once I can think of a design for them. Item Slots(not required) This is for people who wish to allow multiple items of the same type. Say equiping a left handed weapon, right handed weapon, headgear, best, ect. Instead of the basic one armour and on weapon. For ease, you can add item Slots from item types and vice versa. "Item Packages/Item Groups" (Not Started) This will be used to create multiple items in one item. Ex: a briefcase, you open it and get 3items. Or a safe: you open it and get 6items. Items (Started) I have not started this page yet. But it's fairly basic, image, price , value(strength, defense, ect.) and choose item type. If the item type needs more fields for creation in the class files I will be setting it up where it can be done. Inventory (Not Started) Your basic inventory. Will show which items to own. Also your equiped items. Items that are non-equipable can be 'consumed or used'. Health or item boost. Shop(Not Started) Your basic shop, will have categories and items for sale. Black market(Not Started) All user items for sale. May also include a place on user profiles showing items they have for sale. Trade Zone(Not Started) Players can select what items they would like to trade and other players can select items back in a trade deal where the original player can accept or decline.
  10. Congrats @urbanmafia I only submitted my entry for GP. I knew that was winner once submitted. πŸ™‚ I only submitted my entry for GP. I knew that was winner once submitted. πŸ™‚ Edit: now if I could only get yo to reply to my messages like to do forum posts. πŸ™‚
  11. Thank you for participating, the prize money is in your account now! Buy something silly with it πŸ™‚
  12. Thankyou so much really was alot of nice modules released and can't thank everyone enough that has purchased the module. Thankyou to @Dave and to @Dayo for running this competition and dayo for creating such an amazing engine. πŸ™‚
  13. I agree for the winner!!!! It was the best entry from all of us!!! Gratz urban!!!!
  14. We're super excited to announce that @urbanmafia's entry of Automatic Awards System is the winner of the $50 grand prize!
  15. Sim

    Timers

    I still don't have the code tag at in the menus @Dave Here's a quick rundown from some code used in my schooling mod. I added some quick comments //checks if there is a timer if (!$this->user->checkTimer('timerName')) { //gets how many minutes are left till reaches zero $time = $this->user->getTimer('timerName'); //a display message timer $schoolError = array( "timer" => "school", "text"=>"You cant take another class until this one is finished!", "time" => $this->user->getTimer("timerName") ); //puts timer on page $this->html .= $this->page->buildElement('timer', $schoolError); } //Create or update a timer. This creates a timer if it doesnt exist already. $this->user->updateTimer("timerName", $classInfo['seconds'] * 60, true); //No need to update databases to update the timers. Edit: I'm glad someone finally posting coding questions on this form. πŸ™‚
  16. just a noob, how do I add someone to hospital once health hits 0 and they need to spend x amount of time in hosp - found that one I think!
  17. padre

    Timers

    Bare with me still new lol.... I'm wanting to update timers for character stats. I have changed the maximums and names. I'm working on new mod ideas and this timer for say Energy will come into that. At the moment it increase by 4 points / 100. What I want to find out is how to change that to say 5 and see what timer its on so I can change this if say a player pays for a subscription to 10. (I have loads of ideas but am going to build this differently from my past games where I just dumped a heap of things in and really it got a bit lost). I'll edit my post. What I want to do is put in a timer in the Energy/Will/Health character stats with the totals (done those). Increase the timer and create new ones. Add in conditional checks on pages if you're in hospital not just jail and create the hospital timer for different aspects of the game like Russian roulette for instance where you lose all your energy, will and health plus 30000 minutes in hospital (the only way out is either a medical item or wait it out). For the hospital does it need a seperate table in the db? with jail as users might be able to bust/bail and revive. For awards I need to add one to count so they can be recorded.
  18. thanks for that guys. I appreciate it. I'm a long time out of coding now trying to get my head around the code to customise this game the way I want it. Its so much better than what I worked with 10 years ago...congrats to the developer and making this open source. I can see how this can be expanded sooooo much
  19. Sim

    Why developers hate PHP

    That's what I just said about COBOL. And you said
  20. Last week
  21. sniko

    Why developers hate PHP

    I mean damn, have you tried getting a MSB to upgrade from php5.6, not to mention large corporations running on legacy shit πŸ˜…
  22. Easy enough to do? Create a separate table called `player_classes` and have columns set as `id`, `name`, `location`, `banner`. Input your player classes details, and reference location by `location_id` from `locations` table. Add a new column to `users`, called `player_class`, store data through integer - correlating to the appropriate `id` set in `player_classes`. Reference the player class detail through a left join query or create class functions to call the necessary data. Add a dropdown/checkbox player class option in register and send the data on signup.
  23. Right on the target! player classes what’s it called. Yeah nothing to simple, it just put them in a city and give them a banner of what class they are.
  24. Unless you're on PHP 7.4 and typesetting is standard
  25. Player classes + player class-based locations? System factions (not gangs)?
  26. sniko

    Why developers hate PHP

    Perhaps you haven't maintained a large enough codebase that is critical to business infrastructure, especially one that is financial related and data accuracy is pivotal. A lot of projects with PHP architecture is spaghetti code where types are not enforced - it makes it very hard to test and maintain.
  27. basic stats are in the engine but if you want like strength etc install these they will add what you are looking for.
  1. Load more activity
Γ—
Γ—
  • Create New...