Jump to content
  • 0
WhatFT

How to make an Item Combo script?

Question

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?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

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

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

@2nd reply, that script is not working and everytime I wear them no combo effects is happening. I don't know how to use the function either, how to fix it.

Link to comment
Share on other sites

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.