Jump to content
  • 0

Question

2 answers to this question

Recommended Posts

Posted

https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/npc/guild/agit_main.txt

// Spawn boxes in proper order.
for (set .@i,0; .@i < .@Treasure ; set .@i,.@i+1) {
 // set treasure box ID
 set .@boxid, .@treasurebox + (.@i+2) % 2;
 set .@box,1 << .@i;
 // Spawn or do not spawn chests if one already exists.
 if ((getd("$@"+strnpcinfo(2)+"_treasure") & .@box) == 0) {
  monster strnpcinfo(2),.@treasurex[.@i],.@treasurey[.@i],"Treasure Chest",.@boxid,1,"Treasure#"+strnpcinfo(2)+"::OnTreasureDied"+.@i;
  setd "$@"+strnpcinfo(2)+"_treasure",getd("$@"+strnpcinfo(2)+"_treasure") | .@box;
 }
}

Posted

It's just a suggestion but you can also change the economy of the agit_main script to limite investing. This will limited the number treasure boxes for all castles also. I made the change for you if you want to use it.

Peopleperson49

For example:

case 2:
 set .@Economy,GetCastleData(strnpcinfo(2),2);
 if (.@Economy < 6) { set .@eco_invest,5000; }
 else if ((.@Economy >= 9) && (.@Economy <= 11)) { set .@eco_invest,10000; }
 else if ((.@Economy >= 12) && (.@Economy <= 14)) { set .@eco_invest,20000; }
 else if ((.@Economy >= 15) && (.@Economy <= 17)) { set .@eco_invest,35000; }
 else if ((.@Economy >= 18) && (.@Economy <= 19)) { set .@eco_invest,55000; }
 else if ((.@Economy >= 20) && (.@Economy <= 21)) { set .@eco_invest,80000; }
 else if ((.@Economy >= 22) && (.@Economy <= 23)) { set .@eco_invest,110000; }
 else if ((.@Economy >= 24) && (.@Economy <= 25)) { set .@eco_invest,145000; }
 else if ((.@Economy >= 26) && (.@Economy <= 27)) { set .@eco_invest,185000; }
 else if ((.@Economy >= 28) && (.@Economy <= 29)) { set .@eco_invest,230000; }
 else if ((.@Economy >= 30) && (.@Economy <= 31)) { set .@eco_invest,280000; }
 else if ((.@Economy >= 32) && (.@Economy <= 33)) { set .@eco_invest,335000; }
 else if ((.@Economy >= 34) && (.@Economy <= 35)) { set .@eco_invest,395000; }
 else if ((.@Economy >= 36) && (.@Economy <= 37)) { set .@eco_invest,460000; }
 else if ((.@Economy >= 38) && (.@Economy <= 39)) { set .@eco_invest,530000; }
 else if ((.@Economy >= 40) && (.@Economy <= 41)) { set .@eco_invest,605000; }
 else if ((.@Economy >= 42) && (.@Economy <= 43)) { set .@eco_invest,685000; }
 else if ((.@Economy >= 44) && (.@Economy <= 45)) { set .@eco_invest,770000; }
 else if ((.@Economy >= 46) && (.@Economy <= 47)) { set .@eco_invest,860000; }
 else if ((.@Economy >= 48) && (.@Economy <= 50)) { set .@eco_invest,955000; }
 //Quadruple the cost of investing if you've already invested once.
 if (GetCastleData(strnpcinfo(2),4)) {
  set .@eco_invest,.@eco_invest*4;
 }
 mes "["+strnpcinfo(1)+"]";
 mes "If you invest in commercial growth, the quantity of goods made by the guild will increase. Therfore, if you consider our future, investments will be a necessity.";
 mes " ";
 mes "Initially, you are able to invest just once but if you pay more money, you will be able to invest twice.";
 if (.@Economy >= 50) {
  mes " ";
  mes "^ff0000The commercial growth level of our Castle is at it's highest, 50%. No more investments are needed. Just as I have expected from a great economist like you, Master.^000000";
  close;
 }

  • Upvote 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...