since i've never really understood this either tell me if this is right...
say you had a fishing npc and you got 1 gralat for each 7 pounds of fish... could you use something like this where client.fish is how many pounds they've caught...?
NPC Code:
if (playerchats&&strequals(#c,sell fish)) { //or some such...
fishleft=strtofloat(client.fish)%7; //finds if there are fish left over
fishsold=strtofloat(client.fish)-#v(fishleft); //removes left over fish
playerrupees+=(fishsold/7)*1; //total divided by how many bunches you had, times price (1 is optional in this case)
client.fish=fishleft; //restores left over fish as total
}
it would find the remainder and store it as "fish left"
then take it away from the main number of fish and sell the bulk off...
then replace the bulk with what was left over originally...
so if you had 30 fish it would have remainder 2, take two away, sell the 28 for 4g, then replace your ammount with just 2 pounds theoretically...
something i just kinda thought up from reading your guys' posts