Thread: Help Refunding
View Single Post
  #4  
Old 03-11-2012, 03:12 PM
KingMort
Banned
 
Join Date: Sep 2006
Posts: 841
Default

This is what I have it setup as:

Quote:
sub EVENT_SAY
{

if($text=~/Refund/i)
{
if (defined($qglobals{spellspent})) {
$total = $qglobals{spellspent};

$pp = int($total / 1000);
$remainder = $total - $pp * 1000;

$gp = int($remainder / 100);
$remainder = $remainder % 100;

$sp = int($remainder / 10);
$remainder = $remainder % 10;

$cp = $remainder;

quest::givecash($cp, $sp, $gp, $pp);
}
}
}
Anyway the Test Char i used has "150,000" plat on his spellspent.. Said "Refund" and the npc gave him 150 plat.

So very close Once again thank you for your assistance, I'm not sure how to make it give the proper amount any ideas?
Reply With Quote