Quest Problem
I can not seem to get part of this simple quest to work. The hand in works flawlessly but the refund section is not working. If any amount of platinum is turned in it is refunded no matter what the amount....the problem is that it is making the AA's completely free. I am pretty sure the logic is correct but the implementation seems to be a problem and I am not sure how to fix it. If someone could point me in the right direction it would be greatly appreciated.
Code:
sub EVENT_SAY{ |
$platinum != 25000 || 50000 || 75000 || 100000 || 125000 || 150000 || 175000 || 200000 || 225000 || 250000
Each condition is checked sequentially independent of the others, bitwise success is anything not 0 while failure is zero. condition 1: $platinum != 25000 (true if $platinum != 25000) condition 2: 50000 (always true) condition 3: 75000 (always true) condition 4: 100000 (always true) condition 5: 125000 (always true) condition 6: 150000 (always true) condition 7: 175000 (always true) condition 8: 200000 (always true) condition 9: 225000 (always true) condition 10: 250000 (always true) Because 9/10 of the statements are true and they're all an inclusive disjunction it will always trigger as true. However even if it 'worked' as I imagine you want it to it would still always trigger because there will always be one condition that will evaluate as true. ex: F v F v F v F v F v T = T Personally I think you're making it far too complicated; here is how I would accomplish it. Code:
sub EVENT_SAY |
Just to explain what KLS did with the platinum check there (in case you don't have any programming background).
Code:
if($platinum > 0 && $platinum <= 250000 && ($platinum % 25000) == 0) |
KLS your script worked perfectly and it was alot shorter than mine, thank you. I would never have thought to use division and check for a remainder.
|
All times are GMT -4. The time now is 01:46 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.