Jump to content
  • 0

Same item equipped at a time


trenzerai

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  12/27/15
  • Last Seen:  

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

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

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


{ bonus bStr,40; if ( isequippedcnt( 30000 ) >= 2 ) bonus bStr,-10; },{ },{ }

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

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; }
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   13
  • Joined:  06/20/12
  • Last Seen:  

And to correct your if, use if(isequipped(38089) && isequipped(38089)) {

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   0
  • Joined:  12/27/15
  • Last Seen:  

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