Jump to content
  • 0

Same item equipped at a time


Question

Posted

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 :)

4 answers to this question

Recommended Posts

  • 0
Posted

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; }
  • 0
Posted (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 by trenzerai

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