DemonChuck Posted April 13, 2022 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 61 Reputation: 0 Joined: 10/14/12 Last Seen: April 23, 2022 Share Posted April 13, 2022 (edited) Wondering If possible to add more reborn mechanics here like Example 1 - 20 reborn = 1 apple 21 - 40 reborn = Increase Reborn requirements by 2x. 41 - 60 reborn = Increase Reborn requirements by 3x. Every 20x of reborn the requirement increase. Thanks in advance. rebirth_npc.txt Edited April 13, 2022 by DemonChuck wrong typhe Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted May 1, 2022 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 8 hours ago Share Posted May 1, 2022 function deleteItem { .@item_req_ratio = 1; if (@rebirth_type == 1 && ) .@item_req_ratio = max(1, (rebirth_no / 20)); for (.@i=0 ; .@i < .size_item; .@i += 3 ){ if ( !( getarg(0)&(.item_req[.@i+2]) ) ){continue;} delitem .item_req[.@i], ( .item_req[ .@i+1 ] * .@item_req_ratio); } return; } function CheckItemNeed { if ( Weight > 200000 ) { mes "You must reduce your weight to 2000 to do Rebirth."; close; } .@item_req_ratio = 1; if (@rebirth_type == 1 && ) .@item_req_ratio = max(1, (rebirth_no / 20)); .@error = 0; for (.@i=0 ; .@i < .size_item; .@i += 3 ){ if ( !( getarg(0)&(.item_req[.@i+2]) ) ){continue;} if ( countitem( .item_req[.@i] ) < (.item_req[ .@i+1 ] * .@item_req_ratio) ) { mes "You Require [^ff0000"+countitem( .item_req[.@i] )+" / "+ (.item_req[ .@i+1 ] * .@item_req_ratio) +"^000000] ^112FD9"+getitemname( .item_req[.@i] )+"^000000"; .@error = 1; }else{ mes "You Require [^00ff00"+countitem( .item_req[.@i] )+" / "+ (.item_req[ .@i+1 ] * .@item_req_ratio) +"^000000] ^112FD9"+getitemname( .item_req[.@i] )+"^000000"; } } if (.@error && !getarg(1,0)){close;} return; } change the both script function that calculate and display then delete the required items. Quote Link to comment Share on other sites More sharing options...
Question
DemonChuck
Wondering If possible to add more reborn mechanics here like
Example
1 - 20 reborn = 1 apple
21 - 40 reborn = Increase Reborn requirements by 2x.
41 - 60 reborn = Increase Reborn requirements by 3x.
Every 20x of reborn the requirement increase.
Thanks in advance.
rebirth_npc.txt
Edited by DemonChuckwrong typhe
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.