Jump to content

Im Puzzled - Should Be Easy


Cainj

Recommended Posts

ok real fast - i been on this for 6 weeks non stop,

 

weaponid = 1

gold = 976

itemcost = 200

this line is just to check for someone using url to get what they want.

 

if( ((int)$player->weaponId > 1) || ((int)$player->gold < (int)$item->cost) )
then cheater

 

this line is true! How?

weaponid = 1 so the first part should fail, and gold is more than enough to cover the cost. so why does this ring true?

 

btw all vars are set ahead of time, this is jus to check that users are not tying to

Link to comment
https://forums.phpfreaks.com/topic/272322-im-puzzled-should-be-easy/
Share on other sites

figured it out

changed it to item id, as this line actaully covers both weapons and armor in one shot, i was testing buying armor, but it was hardcoded as weapons duh)

 

 

if( ($itemId > 1).......

funny how you get things figured out when you ask and see it from a different perspective - delete this post mod..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.