Jump to content
MakeWebGames

need help with crimes formula..


Hybridd

Recommended Posts

i get an error when i try adding a crime:

QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' 0, '', 'test', 'test', 'test', 'test', 1, 'test', 2)' at line 1

Query was INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP) VALUES( 'test', '1', '((WILL*0.8)/2.5)+(LEVEL/4)', '13', , 0, '', 'test', 'test', 'test', 'test', 1, 'test', 2)

Link to comment
Share on other sites

A simple calculator would help quite a bit if you wanted to keep the same type of formula.

I dont know the exact formula off the top of my head by default but it's something like:

((WILL*0.8)/3)+(LEVEL/4)

Now let's look at some scenarios here with a low and high level player:

Player 1

LEVEL: 1

WILL: 100

((100*0.8)/3)+(1/4) = ~26

Now that's pretty tough for a low level player so for starter crimes it's not bad but what if we use the same formula for a more advanced player:

Player 2

LEVEL: 20

WILL: 500

((500*0.8)/3)+(20/4) = 138

That would be a successful attempt every single time because all results are in % and the crimes do a random number between 1-100, if it's the success result is > random number ? win : lose

if you start lowering that 0.8 a bit that will help lower the chance of success pretty. So

just mess around with the numbers and you can use other stats as well like IQ or Labor since a lot of people don't even mess with those that much either lol.

Edit

as as for your error try removing your '' where you have an int field in the database. You really only need those for strings and will sometimes kick an error.

Edited by KyleMassacre
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...