Newbie Posted February 21, 2014 Share Posted February 21, 2014 (edited) Another freebie for yous guys/girls nothing special ok lets stat with the sql first You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. npc.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. staff_npc.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. open up updates.php and add this into the min cron You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Edited February 21, 2014 by Newbie Quote Link to comment Share on other sites More sharing options...
Newbie Posted February 21, 2014 Author Share Posted February 21, 2014 (edited) never mind fixed the bug now and updated org post :) Edited February 21, 2014 by Newbie Quote Link to comment Share on other sites More sharing options...
Zettieee Posted February 21, 2014 Share Posted February 21, 2014 Great work! Not tested but looks good from here! :) Quote Link to comment Share on other sites More sharing options...
Supervisor Posted February 21, 2014 Share Posted February 21, 2014 (edited) You don't check in the attack script if the NPC exits... This way if they put ?attack=1 behind the url they will just get $500 free each time. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Also, I don't see $_GET['ID'] being secured. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Other then that, Great job :) Edited February 21, 2014 by Supervisor Quote Link to comment Share on other sites More sharing options...
Newbie Posted February 21, 2014 Author Share Posted February 21, 2014 i did have get id secured but i had a flaw in the code and pasted another copy and forgot to secure it again thanks for pointing that out will update code now and then add the check Quote Link to comment Share on other sites More sharing options...
grant Posted February 21, 2014 Share Posted February 21, 2014 do you need to wait 20 mins for the next hit if you beat this npc ??????? Quote Link to comment Share on other sites More sharing options...
Newbie Posted February 21, 2014 Author Share Posted February 21, 2014 if anyone beats the npc the the npc is set to hospital for 20 minutes just change the query if you don't like the 20 minute period :) someone requested this so did a quick one im thinking of recoding it but using a separate class for the npcs Quote Link to comment Share on other sites More sharing options...
grant Posted February 21, 2014 Share Posted February 21, 2014 how are going about making separate class ? so that the npc will never die ??? mabi profiles ? for them ? http://prntscr.com/2uhx58 ||| http://prntscr.com/2uhxce like so ? you need any tips let me know Quote Link to comment Share on other sites More sharing options...
Newbie Posted February 21, 2014 Author Share Posted February 21, 2014 yes kinda like what you jsut showed is what i am looking to create it like. Quote Link to comment Share on other sites More sharing options...
grant Posted February 21, 2014 Share Posted February 21, 2014 its alot of coding but can be done anything can be coded to Grpg i have some time on my hands and will be posting some updates for grpg soon Quote Link to comment Share on other sites More sharing options...
Newbie Posted February 21, 2014 Author Share Posted February 21, 2014 added security to the $_GET['id'] and made a check to make sure the id is real if you used this update your code with the new npc.php Quote Link to comment Share on other sites More sharing options...
Newbie Posted February 21, 2014 Author Share Posted February 21, 2014 i figured it would be pretty big but ill do it little bits at a time :) Quote Link to comment Share on other sites More sharing options...
mags Posted February 22, 2014 Share Posted February 22, 2014 Thank You Newbie for this free plug-in, much appreciated! Quote Link to comment Share on other sites More sharing options...
Newbie Posted February 22, 2014 Author Share Posted February 22, 2014 np mags hope you like it :) Quote Link to comment Share on other sites More sharing options...
Dave Posted February 23, 2014 Share Posted February 23, 2014 It'd be really awesome to have the NPC's randomly attack other players. Would make no player safe (in theory). Build some logic to find players that would be fair to attack, we don't wanna start randomly killing low level players. Then "simulate" the attack and push an event to that user on the outcome. You could either build this into a cron that runs every 30 minutes or so, or potentially build it into the user requests on the page, but this would mean the NPC's are dead when their are no users online. Quote Link to comment Share on other sites More sharing options...
Newbie Posted March 6, 2014 Author Share Posted March 6, 2014 that is a very good idea Dave will see what i can do :) Quote Link to comment Share on other sites More sharing options...
Guest Posted March 6, 2014 Share Posted March 6, 2014 It'd be really awesome to have the NPC's randomly attack other players. Would make no player safe (in theory). Build some logic to find players that would be fair to attack, we don't wanna start randomly killing low level players. Then "simulate" the attack and push an event to that user on the outcome. You could either build this into a cron that runs every 30 minutes or so, or potentially build it into the user requests on the page, but this would mean the NPC's are dead when their are no users online. You could make it attack when the user is offline, might actually make people be online a little more? Quote Link to comment Share on other sites More sharing options...
sniko Posted March 6, 2014 Share Posted March 6, 2014 You could make it attack when the user is offline, might actually make people be online a little more? Ah yes, subliminal blackmail. :p Quote Link to comment Share on other sites More sharing options...
Dominion Posted March 6, 2014 Share Posted March 6, 2014 You could make it attack when the user is offline, might actually make people be online a little more? Linked with Facebook notifications or some other way to inform offline players about an attack it could get players to check the game. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 6, 2014 Share Posted March 6, 2014 Linked with Facebook notifications or some other way to inform offline players about an attack it could get players to check the game. Social media is also a good idea :) Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted March 10, 2014 Share Posted March 10, 2014 Ah yes, subliminal blackmail. :p You must spread some Reputation around before giving it to sniko again. Sorry sniks :P Quote Link to comment Share on other sites More sharing options...
sniko Posted March 10, 2014 Share Posted March 10, 2014 You must spread some Reputation around before giving it to sniko again. Sorry sniks :P haha, that's ok! Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.