Jump to content
  • 0

How to make an Item Combo script?


Question

Posted

How can I make an Item Combo Script?

Example is :

#

20000

Item01

Str +3

Int +5

[item02, Item03]

Max HP +100%

Class : Equipment

Equipped On : Headgear

Weight : 1

How can I make this kind of item combo?

6 answers to this question

Recommended Posts

Posted (edited)

{ bonus bStr,3; bonus bInt,5; if(isequipped(item02,item03)) bonus bMaxHpRate,100; },{ },{ }

you can find alot of examples in your item_db.txt

Edited by quesoph
Posted (edited)

You could also make a function for that, I personally prefer functions for this because it looks cleaner. Here's an example.

Item script:

{ callfunc "yourfunctionname"; },{},{}

And here is an example for your function:

function script yourfunctionname{
 bonus bAllStats,10; //This is the item bonus without any other part equiped
 if(isequipped(itemid1) || isequipped(itemid2)) {
 bonus bAllStats,10; //This is the item bonus with one of the above parts equiped. To change it to both replace the || with &&.
 }

I don't know if you wanted to know this too, so I just post it for you as well, Max HP +100%:

function script yourfunctionname{
 bonus bAllStats,10;
 if(isequipped(itemid1) && isequipped(itemid2)) {
 bonus bMaxHPrate,100;
 }

Edited by Flaid
Posted (edited)

It's simple to use a function. You have to put the function in like a normal NPC and don't forget to add it to your scripts_custom.conf file that it really is getting loaded. After you did that use the script Flaid posted and all will work just fine. However, you can also use this as item script:

{ bonus bStr,3; bonus bInt,5; if ((isequipped(itemid1)) && (isequipped(itemid2))) { bonus bMaxHpRate,100; } },{},{}

Edited by Paranoid
  • 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...