Dustin Rohel Posted May 14, 2022 Share Posted May 14, 2022 (edited) Anyone able to help with a mod so that my players can mug eachother for crystals? Edited May 14, 2022 by Dustin Rohel Misspelling Quote Link to comment Share on other sites More sharing options...
Canjucks Posted May 14, 2022 Share Posted May 14, 2022 change where it says money to crystals and set the value you want them to get per hit Quote Link to comment Share on other sites More sharing options...
Dustin Rohel Posted May 14, 2022 Author Share Posted May 14, 2022 What file? Should have put more description,sorry. I want my players to be able to mug for both cash and crystals. Right now its just cash. Quote Link to comment Share on other sites More sharing options...
WarMad Posted May 14, 2022 Share Posted May 14, 2022 in the mug file Quote Link to comment Share on other sites More sharing options...
AdamHull Posted May 14, 2022 Share Posted May 14, 2022 Are you wanting it to randomly select either cash or crystals. Or are you wanting to separate sections for each Quote Link to comment Share on other sites More sharing options...
Dustin Rohel Posted May 14, 2022 Author Share Posted May 14, 2022 14 minutes ago, AdamHull said: Are you wanting it to randomly select either cash or crystals. Or are you wanting to separate sections for each Separate sections for each Quote Link to comment Share on other sites More sharing options...
Dustin Rohel Posted April 22, 2023 Author Share Posted April 22, 2023 Nobody still has anything usable? Quote Link to comment Share on other sites More sharing options...
corruptcity || skalman Posted April 22, 2023 Share Posted April 22, 2023 This is a basic version of what your after, you can Improve it yourself and can combine the 2 queries into one. Also added an event_add for it to You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote Link to comment Share on other sites More sharing options...
Dustin Rohel Posted April 22, 2023 Author Share Posted April 22, 2023 1 hour ago, corruptcity || skalman said: This is a basic version of what your after, you can Improve it yourself and can combine the 2 queries into one. Also added an event_add for it to $crystals = $ir['crystals']; if($crystals > 5) { $crystals = 5; } $crystalsStole = (int) rand(1, $crystals); $db->query("UPDATE `users` SET `crystals` = `crystals` - {$crystalsStole} WHERE `userid` = {$r['userid']}"); event_add($r['userid'], "<a href='viewuser.php?u=$userid'>{$ir['username']}</a> attacked you and stole {crystalStole} crystals from you!", $c); You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. may be a dumb question.... but im still new at this so..... What file do i put that in? Quote Link to comment Share on other sites More sharing options...
corruptcity || skalman Posted April 22, 2023 Share Posted April 22, 2023 it's either attacktake or attackwon, which ever one has the money query in just remembered that while I was just in the bath I didnt add any error check so that the script only run if the user had crystals to start with. so you will need to add that 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.