Jump to content

Samurai Legend

Members
  • Content Count

    382
  • Joined

  • Last visited

  • Days Won

    1

Samurai Legend last won the day on April 2 2016

Samurai Legend had the most liked content!

Community Reputation

6 Neutral

About Samurai Legend

  • Rank
    Trainee
  • Birthday 02/24/1999

Recent Profile Visitors

11,781 profile views
  1. Laravel Valet is amazing.
  2. My assumptions are the older generation play more of Text Based RPG games whereas, younger generation are playing more of the new gaming techs. The older generation are soon to be gone and will leave the market of text based RPG games more smaller. Please share your thoughts on this matter.
  3. Most of yous know me as the owner of Samurai Assault. I have made decent money from it when I was running it back then. Around £900 - £1,200 a month and yes in British Pounds haha. I want to start it up again however, with a different name as I lost the domains. I am willing to work with someone taking 30% of profit. Requirements - Have an understanding with PHP, HTML, CSS and JavaScript. Knowing how an economy runs. (Will be needed for the in-game economy). As most businesses gain popularity through customer service. Users will need to be handled correctly by staff. (Good customer service skills). Someone who is open minded and will know how to move forward and give users a pleasant experience. There are more requirements however, these four are the main ones Where are we now? At the moment we have a full running system however, there will still need to be tweaks and updates in order to be on our competitors level. The game itself is amazing. With tons of features and with an eye-catchy template. What we need to do now? The system will need to be over-hauled along with buying a domain and hosting. (Which will be covered by me.) If anyone is interested please contact me! No lay lay people please or time-wasters. Potential money to be made!
  4. Post the script where you found the error.
  5. [uSER=53425]Magictallguy[/uSER] I still get the error
  6. [uSER=53425]Magictallguy[/uSER] - Thank you MTG however, I am still receiving an error: [h=1]Samurai Assault - Critical Error[/h] A critical error has occurred, and page execution has stopped. Below are the details: PHP Warning: fopen(http://s1104.photobucket.com/user/Jo...edia/YWN.png): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found (2) Action taken: Line executed: /Users/user/code/game/public/global_func.php:1519 Context at error time: Array ( => [params] => Array ( [http] => Array ( [method] => HEAD ) ) [ctx] => Resource id #38 [http_response_header] => Array ( [0] => HTTP/1.1 404 Not Found [1] => Date: Tue, 12 Jul 2016 10:34:50 GMT [2] => Server: Apache [3] => Set-Cookie: PHPSESSID=t6insiehpjfk3pq67miiri5444; path=/; domain=.photobucket.com [4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT [5] => Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 [6] => Pragma: no-cache [7] => Set-Cookie: pb_userid=NWYyYWQ5ZGI0YWM5NmZiMGI1YzEwZDk1ZWUwZjllMWUkYToxOntzOjc6InRyYWNraWQiO3M6MjQ6IjE0NjgzMTk2OTAuMzgyMzY2NzYyOTc3MSI7fQ%3D%3D; expires=Sun, 30-Jul-2084 13:48:56 GMT; Max-Age=2147483646; path=/; domain=.photobucket.com [8] => Set-Cookie: pb_mobile=false; expires=Wed, 13-Jul-2016 10:34:50 GMT; Max-Age=86400; path=/; domain=.photobucket.com [9] => Set-Cookie: _sfkcs2_t6insiehpjfk3pq67miiri5444=TQaeWewbBVqOOW%2FKIpVpHzhghsWgEYcj9n%2BK2iVetiEd0OpfQtg%3D; path=/; domain=.photobucket.com [10] => Cache-Control: no-cache [11] => Vary: User-Agent,Accept-Encoding [12] => Connection: close [13] => Content-Type: text/html; charset=utf-8 ) )
  7. I need that switched on, can I not use an IF statement?
  8. Aha, understood. How would I make it not show the error?
  9. [uSER=53425]Magictallguy[/uSER] - Yes indeed, it is your function. You was helping me out remember :P But yeah I can't seem to see the issue why it don't work with Photobucket links?
  10. Hello all, I have an issue which I can not identify the issue why it occurs. Whenever, someone uses an Photobucket link to update their image it gives an error however, using an alternative image host it gives no errors? Error Message -   Samurai Assault - Critical Error   A critical error has occurred, and page execution has stopped. Below are the details:   PHP Warning: fopen( http://s1104.photobucket.com/user/Jordan_Pollard/media/YWN.png): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found (2)     Action taken: Line executed: /home/samurai/public_html/live/public/global_func.php:1519     Context at error time:     Array   (   =>   [params] => Array   (   [http] => Array   (   [method] => HEAD   )   )   [ctx] => Resource id #4   [http_response_header] => Array   (   [0] => HTTP/1.1 404 Not Found   [1] => Date: Tue, 05 Jul 2016 09:30:24 GMT   [2] => Server: Apache   [3] => Set-Cookie: PHPSESSID=lpvp9mkgi8vjen092r0qkeqpj7; path=/; domain=.photobucket.com   [4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT   [5] => Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0   [6] => Pragma: no-cache   [7] => Set-Cookie: pb_userid=ZTI2MzFlMjkyZTdjZDZiODA5NmMyYWMxM2E3ZDg2YTMkYToxOntzOjc6InRyYWNraWQiO3M6MjQ6IjE0Njc3MTEwMjQuMzA4NDk2MTY0OTQwNSI7fQ%3D%3D; expires=Sun, 23-Jul-2084 12:44:30 GMT; Max-Age=2147483646; path=/; domain=.photobucket.com   [8] => Set-Cookie: pb_mobile=false; expires=Wed, 06-Jul-2016 09:30:24 GMT; Max-Age=86400; path=/; domain=.photobucket.com   [9] => Set-Cookie: _sfkcs2_lpvp9mkgi8vjen092r0qkeqpj7=TQaeWewbBVqOOW%2FKIpVpHzhghsWgEYcj9n%2BK2iVetiEd0OpfQtg%3D; path=/; domain=.photobucket.com   [10] => Cache-Control: no-cache   [11] => Vary: User-Agent,Accept-Encoding   [12] => Connection: close   [13] => Content-Type: text/html; charset=utf-8   )   )   global_func.php - function isImage($url) { $url = filter_var($url, FILTER_VALIDATE_URL) ? filter_var($url, FILTER_SANITIZE_URL) : null; if(empty($url)) return false; $params = ['http' => ['method' => 'HEAD']]; $ctx = stream_context_create($params); $fp = fopen($url, 'rb', false, $ctx); if(!$fp) return false; // Problem with url $meta = stream_get_meta_data($fp); if ($meta === false) { fclose($fp); return false; // Problem reading data from url } $wrapper_data = $meta['wrapper_data']; if(is_array($wrapper_data)) foreach(array_keys($wrapper_data) as $hh) if (substr($wrapper_data[$hh], 0, 19) == "Content-Type: image") { fclose($fp); return true; } fclose($fp); return false; } line 1519: $fp = fopen($url, 'rb', false, $ctx);
  11. I attempted to to copy how the ones in the user field coding is to make it update the user_rangers table however, I came across many errors
  12. So my fields are on another table which is called `user_rangers`. When users use a dexterity potions I want their dexterity which is `urDEXTERITY` in `user_rangers` to do whatever I set it as in the staff panel. In the `items` table the the `effect1` is: a:4:{s:4:"stat?;s:11:?urDEXTERITY";s:3:"dir";s:3:"pos";s:8:"inc_type";s:7:"percent";s:10:"inc_amount";i:100;}   <?php define('PAGE_HEADER', 'Use Item'); require('globals.php'); $_GET['ID'] = (isset($_GET['ID']) && is_numeric($_GET['ID'])) ? abs(intval($_GET['ID'])) : ''; $_POST['qty'] = (isset($_POST['qty']) && is_numeric($_POST['qty'])) ? abs(intval($_POST['qty'])) : ''; $tresder = rand(99, 999); if (!empty($_POST['qty']) && !empty($_GET['ID'])) { $id = $db->query( "SELECT `effect1`, `effect2`, `effect3`, `effect1_on`, `effect2_on`, `effect3_on`, `inv_qty`, `itmname`, `inv_itemid`, `itmtype` FROM `inventory` AS `iv` INNER JOIN `items` AS `i` ON `iv`.`inv_itemid` = `i`.`itmid` WHERE `iv`.`inv_id` = {$_GET['ID']} AND `iv`.`inv_userid` = $userid"); if ($db->num_rows($id) == 0) { error('Invalid item ID'); } else { $r = $db->fetch_row($id); if($r['itmname'] == 'Crew Exploder') { if($ir['hospital'] > 0 || $ir['prison'] > 0) { error("This page cannot be accessed while in prison or hospital."); } echo "<h3><u>Crew Exploder</u></h3><hr width=75%> Crew Exploder Instructions:<br /> Enter the ID of a member of the Crew that you wish to use the Crew Exploder on.<br /><br /> Further Information:<br /><br /> 1) 10 - 40 minutes hospital time.<br /> 2) Crew exploders can only be used on members not in hospital or prison.<br /> 3) Hospital time is only issued to members not already in hospital or prison.<br /> 4) Crew exploders can only be used on members of a crew that you are in war with.<br /> 5) Respect is gained at a rate of 3 respect per member hospitalised.<br /> </br> <form action='crew_exploder.php' method='get'> <input type='hidden' name='ID' value='{$_GET['ID']}' /> <input type='hidden' name='tresde' value='$tresder' /> User ID: <input type='text' name='userid' value='' /><br /></br> <input type='submit' value='Initiate' /></form> <hr width = '75%'><a href = 'index.php'>>Go Back</a><hr width = '75%'>"; exit($h->endpage()); } if ($_POST['qty'] > $r['inv_qty']) { error('You are trying to use more than you have!'); } else { if (!$r['effect1_on'] && !$r['effect2_on'] && !$r['effect3_on']) { error('Sorry, this item cannot be used as it has no effect.'); } for ($enum = 1; $enum <= 3; $enum++) { if ($r["effect{$enum}_on"]) { $einfo = unserialize($r["effect{$enum}"]); if ($einfo['inc_type'] == "percent") { if (in_array($einfo['stat'], array('energy', 'mood', 'courage', 'hp'))) { $inc = round( $ir['max' . $einfo['stat']] / 100 * $einfo['inc_amount']) * $_POST['qty']; } else { $inc = round( $ir[$einfo['stat']] / 100 * $einfo['inc_amount']) * $_POST['qty']; } } else { $inc = $einfo['inc_amount'] * $_POST['qty']; } if ($einfo['dir'] == "pos") { if (in_array($einfo['stat'], array('energy', 'mood', 'courage', 'hp'))) { $ir[$einfo['stat']] = min($ir[$einfo['stat']] + $inc, $ir['max' . $einfo['stat']]); } else { $ir[$einfo['stat']] += $inc; } } else { $ir[$einfo['stat']] = max($ir[$einfo['stat']] - $inc, 0); } $upd = $ir[$einfo['stat']]; if (in_array($einfo['stat'], array('strength', 'agility', 'guard', 'labour', 'IQ'))) { $db->query( "UPDATE `userstats` SET `{$einfo['stat']}` = '{$upd}' WHERE `userid` = {$userid}"); } else if (in_array($einfo['stat'], array('urDEXTERITY'))) { $db->query( "UPDATE `user_rangers` SET `{$einfo['stat']}` = '{$upd}' WHERE `userid` = {$userid}"); } else { $db->query( "UPDATE `users` SET `{$einfo['stat']}` = '{$upd}' WHERE `userid` = {$userid}"); } } } $qty = $r['inv_qty'] - $_POST['qty']; item_remove($userid, $r['inv_itemid'], $_POST['qty']); confirmation("<font colot='yellow'>x{$_POST['qty']}</font> {$r['itmname']} used successfully!<br/>You have <font color='yellow'>x{$qty}</font> {$r['itmname']} remaining."); } } } else if (!empty($_GET['ID']) && empty($_POST['qty'])) { $id = $db->query( "SELECT `itmid`, `inv_qty`, `itmname`, `itmtype` FROM `inventory` AS `iv` INNER JOIN `items` AS `it` ON `iv`.`inv_itemid` = `it`.`itmid` WHERE `iv`.`inv_id` = {$_GET['ID']} AND `iv`.`inv_userid` = {$userid} LIMIT 1"); if ($db->num_rows($id) == 0) { error('Invalid item ID'); } else { $itemid = abs((int) $_GET['ID'])+0; $r = $db->fetch_row($id); /*if($r['itmid'] == 7){ echo "<h3><u>Item Use</u></h3> <hr/><b>Enter how many {$r['itmname']} you want to use. You have {$r['inv_qty']} to use.</b> <hr/> <form action='itemuse.php?ID={$_GET['ID']}' method='post'> <input type='hidden' name='verf' /> Quantity: <input type='text' name='qty' value='' /> <br /> <input type='submit' value='Use Items (no prompt so be sure!)' /> </form><hr/><a href = 'index.php'>>Go Back</a><hr/> "; } else*/ if($r['itmtype'] == 1){ echo "<h3><u>Item Use</u></h3><hr width = '75%'><table width='75%' class='table' border='0' cellspacing='1' cellpadding='1'> <tr><th colspan = '3'>Multi Use</th></tr> <tr> <th>Item</th> <th>Qty</th> <th>Use</th> </tr> <tr> <th>{$r['itmname']}</th> <td><font color='yellow'>x{$r['inv_qty']}</font></td> <form action='itemuse.php?ID={$_GET['ID']}' method='post'> <input type='hidden' name='verf' /> <td><input type='text' name='qty' value='' /></td> </tr> <tr><th colspan='3'><input type='submit' value='Use Item' /></th></tr> </form></table><hr width = '75%'> "; } else { echo "<h3><u>Item Use</u></h3> <hr/><b>Are you sure you want to use one ".$r['itmname']."?</b> <hr/> <form action='itemuse.php?ID={$_GET['ID']}' method='post'> <input type='hidden' name='verf' /> <input type='hidden' name='qty' value='1' /> <br /> <input type='submit' value='Use Item' /> </form><hr/><a href = 'index.php'>>Go Back</a><hr/> "; } } $db->free_result($id); } else { error('Invalid use of file.'); } $h->endpage();   I can't seem to get it to work.
  13. [uSER=53425]Magictallguy[/uSER] - So when I click the submit button this is the URL: staff_userlogs.php?user=14 This is what displays on the screen: This script requires an action.
  14. ​[uSER=53425]Magictallguy[/uSER] [uSER=65530]Coly010[/uSER] - Thank you guys for the help!
×
×
  • Create New...