Nero Posted February 23, 2012 Posted February 23, 2012 Requesting for Combo script like If item1 or item 2 is equipped then + attributes how to make that thanks. Quote
ngek202 Posted February 23, 2012 Posted February 23, 2012 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; },{},{} Quote
Peopleperson49 Posted April 24, 2012 Posted April 24, 2012 What specifically do you want that combo to do and so you have any specific items in mind? Peopleperson49 Quote
Flaid Posted April 26, 2012 Posted April 26, 2012 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 &&. } Quote
Peopleperson49 Posted April 26, 2012 Posted April 26, 2012 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 Quote
Flaid Posted April 28, 2012 Posted April 28, 2012 I was admin on a bigger server and did everything with functions, never experienced any lag. Quote
Question
Nero
Requesting for Combo script like
If item1 or item 2 is equipped then
+ attributes
how to make that thanks.
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.