Jump to content
  • 0

How to make an Item Combo script?


WhatFT

Question


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  210
  • Reputation:   10
  • Joined:  11/20/11
  • Last Seen:  

{ 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


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   140
  • Joined:  01/04/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  308
  • Reputation:   3
  • Joined:  12/18/11
  • Last Seen:  

2nd post, is the same as combo script in valkyrie set.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

@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


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  8
  • Reputation:   2
  • Joined:  03/15/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  308
  • Reputation:   3
  • Joined:  12/18/11
  • Last Seen:  

make a 3 item, the 2nd post is only for the 3rd item, make sure you have the 1st and 2nd item script.

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