Jump to content
  • 0

helpTAX SHOP


Obiwan

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  88
  • Reputation:   0
  • Joined:  08/25/12
  • Last Seen:  

Hi i get this script from this thread

 

http://rathena.org/board/topic/73493-tax-script/

 

Here is the script code 

 

 

http://pastebin.com/raw.php?i=vnqJevtM
-    shop    tax_Shop    -1,909:100


prontera,155,181,5    script    Sample#taxshop    757,{
if( select( "Open Shop",( getcharid(0) == getguildmasterid(getcastledata( .CastleMap$,1 )) )?"Collect Tax":"" ) == 1 ){
    mes "A Total of "+.TaxRate+"% will be transfer to "+getguildname( getcastledata( .CastleMap$,1 ) )+" Guild.";
    callshop "tax_Shop",1;
    npcshopattach "tax_Shop";
    end;
}else{
    mes "Gained total of "+$Guild_Tax+" Zeny.";
    if( select("Collect:Cancel") == 1 ){
        set Zeny,Zeny + $Guild_Tax;
        set $Guild_Tax,0;
        mes "Tax Collected.";
    }
}
close;

OnBuyItem:
    set .@TotalCost,0;
    for(set .@i,0; .@i < getarraysize( @bought_nameid ); set .@i,.@i+1)
        for(set .@j,0; .@j < getarraysize( .Items ); set .@j,.@j+1)
            if( .Items[.@j] == @bought_nameid[.@i] )
            set .@TotalCost,.@TotalCost + ( .Costs[.@j] * @bought_quantity[.@i] );
    if( Zeny >= .@TotalCost ){
        set Zeny,Zeny - .@TotalCost;
        for(set .@i,0; .@i < getarraysize( @bought_nameid ); set .@i,.@i+1)
            getitem @bought_nameid[.@i],@bought_quantity[.@i];
        set $Guild_Tax,$Guild_Tax + (( .@TotalCost * .TaxRate ) / 100 );
        message strcharinfo(0),"Tax Gained by "+getguildname( getcastledata( .CastleMap$,1 ) )+" Guild : "+(( .@TotalCost * .TaxRate ) / 100 )+" Zeny";
    }else{
        mes "You dont have enough Zeny...";
    }
    close;


OnInit:
// Castle Map Name
set .CastleMap$,"prtg_cas03";
// Tax Gained upon purchasing
set .TaxRate,10;
// Item List + Cost
setarray .Items[0],607,608,512;
setarray .Costs[0],100,200,300;

npcshopitem "tax_Shop",512,1000;
npcshopdelitem "tax_Shop",512;
for(set .@i,0; .@i < getarraysize( .Items ); set .@i,.@i+1)
    npcshopadditem "tax_Shop",.Items[.@i],.Costs[.@i];
end;

}

Untitled.png


Need help here 

Edited by eXibitz
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

your fix.

....."Collect Tax - "+$Guild_Tax+" zeny":"" ) == 1 ) {

* You should upload your edited script, not the original script since the error come from your own mistake during the edits.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  88
  • Reputation:   0
  • Joined:  08/25/12
  • Last Seen:  

hi i did not edit the script sir i just put in on my server then the error shows sir emistry 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

it's either you have edited your script, or you post a wrong version of script.

 

 

you're absolutely posting a different script if compare both from the codebox and the screenshot.

Link to comment
Share on other sites

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