Jump to content
  • 0

Help POints


maynard

Question


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

Please help I change the gold room into points, I somehow made it work, The problem is in case 3 its always zero.Theres a tax if you farm and I cant get the tax that earn. Whenever I claim or look if I earn more tax its always 0. Here's the script.

payon,237,197,5 script Guild Gold Room 813,{
set .Guild,getcastledata( "prtg_cas01",1 );
if(getgmlevel () >=90) {
mes "NPCNAME";
mes "Hello GM!What do you want to do";
next;
switch(select("Reset PESO Points:Player View:Cancel")) {
case 1:
mes "NPCNAME";
mes "Okay reseting the PESO points.";
next;
mes "NPCNAME";
mes "Okay I reseted the Points.";
set #PESO,#PESO - 2000000000;
close;
case 2:
goto OnPlayer;
case 3:
close;
}
}
OnPlayer:
if( getcharid(2) == .Guild ){
mes "^FF0000Current Tax : "+$Tax+" %";
mes "Total Earning : "+$Earn+" PESOPOINTS.";
}
mes "This Gold Room is currently owned by ^FF0000"+getguildname( .Guild )+" Guild^000000.";
mes "You may hunt gold inside the room, but with a ^FF0000"+$Tax+" % Tax Rate^000000.";
mes "Each kill in the Room you will gain 1 Points and each point equal to 10 PESO.";
next;
switch( select( "Hunt Gold",
"Claim POINTS",
( strcharinfo(0) != getguildmaster( .Guild ) )?"":"[^0000FFMaster^000000] Claim Earn",
( strcharinfo(0) != getguildmaster( .Guild ) )?"":"[^0000FFMaster^000000] Change Tax" )){

Case 1: warp "lou_dun02",0,0; end;
Case 2:
 mes "You have "+#PESO+" Points.";
 if( !#PESO ) close;
 mes "How many you want to points claim ?";
 input @Amount,0,#PESO;
 if( !@Amount ) close;
 next;
 set #PESO,#PESO - @Amount;
 set .@Gain,(( @Amount * 10 ) - ( @Amount * 10 * $Tax / 100 ));
 set #PESOPOINTS,#PESOPOINTS + .@Gain;
 mes "Gained ^FF0000"+.@Gain+"^000000 POINTS due to Tax Rate of "+$Tax+" %";
 close;
Case 3:
 mes "Total Earning : "+$Earn+" POINTS.";
 if( select("Claim It:Cancel") == 2 ) close;
 mes "How much you want to claim ?";
 do{
  input @Amount,0,$Earn;
  if( !@Amount ) close;
  if( ( #PESOPOINTS + @Amount ) > 1000000000 ) mes "Limit Exceed...";
 }while( ( #PESOPOINTS + @Amount ) > 1000000000 );
 mes "Gained "+@Amount+" #PESOPOINTS.";
 set #PESOPOINTS,#PESOPOINTS + @Amount;
 set $Earn,$Earn - @Amount;
 close;
Case 4:
 mes "^FF0000Current Tax : "+$Tax+" %";
 mes "Enter your New Tax Rate.";
 input $Tax,1,35;
 mes "^FF0000Updated Tax : "+$Tax+" %";
 close;
}
OnInit:
monster "lou_dun02",0,0,"Gold",2002,1000,strnpcinfo(0)+"::OnMobKill";
end;
OnMobKill:
monster "lou_dun02",0,0,"Gold",2002,1,strnpcinfo(0)+"::OnMobKill";
set $Earn,$Earn + ( 10 * $Tax / 100 );
set #PESO,#PESO + 1;
dispbottom "Total PESO Point = "+#PESO+" Points.";
end;
}
lou_dun02 mapflag nodrop
lou_dun02 mapflag noexp
lou_dun02 mapflag nowarpto
lou_dun02 mapflag noSave
lou_dun02 mapflag noteleport
lou_dun02 mapflag novending
lou_dun02 mapflag noreturn
lou_dun02 mapflag nobranch
lou_dun02 mapflag noloot
lou_dun02 mapflag nomemo

if they kill 1 monster they get 1 peso then exchange it to 1=10pesopoints. I want to make it work that they earn and get the tax from player.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

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

Guest
Answer this question...

×   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...