trenzerai Posted February 2, 2016 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 20 Reputation: 0 Joined: 12/27/15 Last Seen: June 26, 2020 Share Posted February 2, 2016 Hello everyone, Can anybody help me with this database script. Im using it as function instead of item combo function script str_r { bonus bStr,40; if(isequipped(38089,38089)) { bonus bStr,-20; end; } else if(isequipped(38090,28089)) { bonus bStr,-10; bonus bAgi,30; end; } } Usage: Sample items: str belt a and b and 1 agi belt When i equip the str belt a it should give me +40 to str (single accessory equipped) When i equip both Belts, It would give me a +80 str but will deduct 20 to str, so str = 60 (both accessory equipped) When i equip Str belt a or b and the agi belt, the bonus to agi and str will be +30 P.S. If im @ wrong thread just move this Thanks in advance Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted February 3, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted February 3, 2016 { bonus bStr,40; if ( isequippedcnt( 30000 ) >= 2 ) bonus bStr,-10; },{ },{ } 1 Quote Link to comment Share on other sites More sharing options...
0 sotf Posted February 2, 2016 Group: Members Topic Count: 43 Topics Per Day: 0.01 Content Count: 173 Reputation: 9 Joined: 11/14/12 Last Seen: June 7, 2023 Share Posted February 2, 2016 Uhm.. Question, why not use item_combo_db.txt? item_db: 30000,str_belt,str_belt,4,30000,,100,,0,,1,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bStr,40; },{},{} 30001,agi_belt,agi_belt,4,30000,,100,,0,,1,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bAgi,10; },{},{} item_combo_db: 30000:30000,{ bonus bStr,-20; } 30000:30001,{ bonus bAgi,30; bonus bStr,30; } Quote Link to comment Share on other sites More sharing options...
0 Moriarty Posted February 2, 2016 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 135 Reputation: 13 Joined: 06/20/12 Last Seen: April 14, 2018 Share Posted February 2, 2016 And to correct your if, use if(isequipped(38089) && isequipped(38089)) { Quote Link to comment Share on other sites More sharing options...
0 trenzerai Posted February 4, 2016 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 20 Reputation: 0 Joined: 12/27/15 Last Seen: June 26, 2020 Author Share Posted February 4, 2016 (edited) { bonus bStr,40; if ( isequippedcnt( 30000 ) >= 2 ) bonus bStr,-10; },{ },{ } Solved @ this script, Im using function because im going to bind the script for 6 different items with 5 different stat additions/deductions, I used this code as the root (on quoted message" and comes up like this: [Start of Single item function script] function script str_r { bonus bStr,40; if( isequippedcnt( 35089 ) >= 2 ) {bonus bStr,-10;} if( isequippedcnt( 35090 ) >= 1 ) {bonus bAgi,15;bonus bStr,-25;} if( isequippedcnt( 35091 ) >= 1 ) {bonus bVit,15;bonus bStr,-25;} if( isequippedcnt( 35092 ) >= 1 ) {bonus bInt,15;bonus bStr,-25;} if( isequippedcnt( 35093 ) >= 1 ) {bonus bDex,15;bonus bStr,-25;} if( isequippedcnt( 35094 ) >= 1 ) {bonus bLuk,15;bonus bStr,-25;} end; } Thx so much for replies. i hope my script would be useful for everybody Edited February 4, 2016 by trenzerai Quote Link to comment Share on other sites More sharing options...
Question
trenzerai
Hello everyone,
Can anybody help me with this database script.
Im using it as function instead of item combo
Usage:
Sample items: str belt a and b and 1 agi belt
When i equip the str belt a it should give me +40 to str (single accessory equipped)
When i equip both Belts, It would give me a +80 str but will deduct 20 to str, so str = 60 (both accessory equipped)
When i equip Str belt a or b and the agi belt, the bonus to agi and str will be +30
P.S. If im @ wrong thread just move this
Thanks in advance
Link to comment
Share on other sites
4 answers 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.