-
Posts
2,392 -
Joined
-
Last visited
-
Days Won
62
Content Type
Profiles
Forums
Events
Everything posted by Sim
-
The new item system is released. Since the price is a bit higher then the majority of other mod released. .
-
This looks really good. You should post it on the marketplace so people don't have to copy and paste the code.
-
When it comes to code itself, your agree with me way more then you think. :)
-
I would use a switch statement though. Easier to read. I overthink things alot to.
-
I did try that after you mentioned it, but all it did was replace the <{extraHTML}> with nothing's. Funny, cause there's a thread in here somewhere created by me months ago asking how to include HTML from a variable into the template and we finally got an answer in another thread. What version is this supported in?
-
What does <{extraHTML}> do? The < >? $extra = $itemType->getAdminHTML(); $html = $this->page->buildElement("form", $data); $html = str_replace("(extraHTML)", $extra, $html); return $this->html .= $html; Funny this works though.
-
I don't know what I did but now my save button disappears. I think it's a problem with the HTML. PHP: $html = $this->page->buildElement("form", $data); debug($html); $html = str_replace("(extraHTML)", $itemType->getAdminHTML(), $html); HTML Part #1: public $form = ' <center><b>{stepMessage}</b><center> <form method="post" action="?page=admin&module=items&action={editType}&id={id}" enctype="multipart/form-data"> <input type="hidden" name="extraData" id="extra" value="{extraData}"> <div class="formid-group"> <label class="pull-left">Name</label> <input type="text" class="form-control" name="name" value="{name}"> </div> <div class="form-group"> <label class="pull-left">Desc:</label> <input type="text" class="form-control" name="desc" value="{desc}"> </div> <div class="form-group"> <label class="pull-left">Image</label> <input class="form-control" type="file" name="file" id="file" /> </div> <div class="form-group"> <label class="pull-left">Resize Image Height to:</label> <input type="number" class="form-control" name="height" value="{height}"> </div> <div class="form-group"> <label class="pull-left">Reize Image Width to:</label> <input type="number" class="form-control" name="width" value="{width}"> </div> <div class="form-group"> <label class="pull-left">Price $$</label> <input type="number" class="form-control" name="price" value="{price}"> </div> <div class="form-group"> <label class="pull-left">Cost ({_setting "pointsName"}):</label> <input type="number" class="form-control" name="points" value="{points}"> </div> <div class="form-group"> <label class="pull-left">Item Types Allowed> (Note: If you want these item types to be attached to this item slot)</label> <select class="form-control" name="itemTypes[]" id="itemTypes[]" size="10" multiple="multiple"> <option value="0">None</option> {#each itemType} <option value="{id}" {selected}>{name}</option> {/each} </select> </div> <div class="form-group"> <label class="pull-left">Value (ex: damage, armour, health, bonus, ect.)</label> <input type="number" class="form-control" name="value" value="{value}"> </div> <div class="form-group"> <label class="pull-left">Slot Spaces(How many spot spaces does this item take up)</label> <input type="number" class="form-control" name="slots" value="{slots}"> </div> (extraHTML) <div class="text-right"> <button class="btn btn-default" name="submit" type="submit" value="1">Save</button> </div> test test test test test test text me when you get a chance can you send me the link to the video of the day and I will be there in a few minutes to talk to you about it when I get home I will send you the link to the video of the day and I will be there in a few minutes to talk </form> '; PART #2: //returns additional admin HTML if needed for adding/edit this item type public function getAdminHTML() { global $helper; $items = $helper->getItems(); $itemList = ""; foreach($items as $item) { $itemList .= '<option value="' . $item["id"] . '">' . $item["name"] . '</option> '; } $html = ' <div class="form-group"> <label class="pull-left">#Of Items To Grant</label> <input type="text" class="form-control" name="count" value="{count}"> </div> <div class="form-group"> <label class="pull-left">Select items that can be randomly given: </label> <select class="form-control" name="items[]" id="items[]" size="10" multiple="multiple"> <option value="0">None</option> ' . $itemList . ' </select> </div> '; return $html; } EVERYTHING after (extraHTML) gets removed. So I'm thinking that there's something wrong with the HTML tags in getAdminHTML
-
It does. Sometimes real life just takes away from development of your living isn't coming from it.
-
Just what I need. 🙂
-
I love seeing all these updates, I might need to create a post like this. *You given me motivation*
-
Thanks for the reply @Zeddicus
-
Welcome back to the community!! If you need any help you can always message me and hopefully I know the answer.
-
The latest version of GL should be included in the next release of GL in the ACP @Dayo request Installed Version: Latest Version:
-
No. That's why it's surprised me. In think I might have called it twice.
-
//THIS A SNIPPLET $mainType = new $data['parentID']($data); debug("test"); debug(var_dump($mainType)); //EXTRA DATA $extraData = $mainType->getAdminHTML(); debug("test"); debug($extraData); if($extraData != "") { debug("test"); return $this->createNewItemTypeWithExtraData($mainType, $data, "new"); } The problem occurs when I call the method. Not while initiating the class. File: /home/simmakew/public_html/GL/modules/installed/itemTypes/Types/ItemTypes.interface.php Line: 3 Error: Cannot declare interface Item_Type, because the name is already in use Type: E_RECOVERABLE_ERROR Anyone got any ideas?
-
GL battle system is really different. The only time the person gets attacked is when they get shot. Every player starts at 0. This is why I asked.
-
Can you explain how the health system in GL works. Everyone's HP is at 0? Is it based on % done to player or what?
-
Yo should download Gangster Legends. It can create the same type of game, newer code and more people are coding for it nowadays. It can be downloaded in the MWG marketplace.
-
I'm going to use this topic for various small encounters I have. DATA: array(4) { [0]=> array(11) { ["invID"]=> string(2) "30" ["itemID"]=> string(1) "1" ["name"]=> string(14) "Military knife" ["fileType"]=> string(4) ".png" ["height"]=> string(3) "100" ["width"]=> string(3) "100" ["price"]=> string(2) "32" ["value"]=> string(2) "17" ["types"]=> string(6) ":0:24:" ["slot"]=> string(18) "LEFT Handed Weapon" ["slotID"]=> string(2) "10" } [1]=> array(2) { ["slot"]=> string(8) "Headware" ["slotID"]=> string(2) "11" } [2]=> array(11) { ["invID"]=> string(2) "14" ["itemID"]=> string(1) "3" ["name"]=> string(11) "Claw Hammer" ["fileType"]=> string(4) ".png" ["height"]=> string(3) "100" ["width"]=> string(3) "100" ["price"]=> string(2) "21" ["value"]=> string(1) "8" ["types"]=> string(6) ":0:24:" ["slot"]=> string(7) "Special" ["slotID"]=> string(2) "32" } [3]=> array(2) { ["slot"]=> string(19) "Right handed weapon" ["slotID"]=> string(2) "35" } } $equipedItems = $this->getPlayerSlotInfo($userID); debug(var_dump($equipedItems)); foreach($equipedItems as $item) { //debug($item); if(!empty($item["types"])) { $iTypes = explode(":", $item['types']); $types = ""; debug($item); for($z=1;$z<count($iTypes)-1;$z++){ $type = ""; if($iTypes[$z] != 0 && $iTypes != ""){ $type = $this->getItemType($iTypes[$z]); //debug($type); if($type['parentID'] == "Weapon") { debug("Weapon"); unset($item); break 1; } } } } } The problem is it shows WEAPON 4X WHEN IT SHOULD ONLY BE DONE Complete debug DATA: Nevermind. I just hire realized I was curious do in the method twice so double the days and was deciding this for hours.
-
Pre-order now for a discount. This mod price will be raised once released Friday. I also have a July promotion where I will give credit for however much you spend. So if you spend $20.00, you get $20.. in free mods developed from me. All people who purchase before release will be notified via private message upon release.
-
- 1
-
-
Maybe y'all can see something I am looking past. HTML: it's inside the form tags. EDIT: NVM. I forgot there's no ID, only name. {name} is supposed to be in the ID to.
-
I know I mentioned this before, but in don't plan on releasing my game till I know I don't have to touch any content for a month. That means me playing for a month grinding. To be sure there is enough new content.