Jump to content
  • 0

Requesting for Combo Script


Nero

Question


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  194
  • Reputation:   2
  • Joined:  12/18/11
  • Last Seen:  

Requesting for Combo script like

If item1 or item 2 is equipped then

+ attributes

how to make that thanks.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

one sample if you look into item_db script is valkyrie set.

the bonus is bAllStats,1; or All Stats +1. the script is on the Helm item 5171 checks if

the items 2357, 2421, and 2524 are equipped.

{ bonus bMdef,5; if(isequipped(2357,2421,2524)) bonus bAllStats,1; },{},{}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

What specifically do you want that combo to do and so you have any specific items in mind?

Peopleperson49

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)) { //You can of course remove the second isequipped if you want.
 bonus bAllStats,10; //This is the item bonus with one of the above parts equiped. To change it to both replace the || with &&.
 }

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Functions work, but that script will stay loaded in memory for long periods of time. Get a bunch of people playing with that same item and you could get lag from it or other scripts. Granted, it would take more than just a few players to cause it. I had a similiar thing happen on my previous server, which had around 500 people on (average of around 150). Man, those were the glory days... Anyways, when I cut out the scripts that ran server wide such as those the problem seems to stop.

Peopleperson49

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:  

I was admin on a bigger server and did everything with functions, never experienced any lag.

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