scripting questions: dynamic mob level adjustments, caskets
Posted: Mon May 23, 2016 10:50 am
Hey all! I've gotten back into things lately and have been doing some tinkering, but have run into a couple snags. Might I trouble you all for some insight on a few questions?
First question:
Is there a method for dynamically adjusting the level range of mobs in an area (either on next respawn or instantly) based on a variable like a player level or length of battle?
I dug into the mobentity files looking for functions I might be able to use, and tried SetMLevel(); but had no luck. Would anyone have a suggestion on how to do this via a script? I'm looking to have mobs spawn based on the level of a player when they zone in to an area or after they make a kill, and don't want the permanence that would come with editing the min/max values in the database.
Second Question:
Is anyone familiar with the process behind making treasure caskets spawn? I tried playing around with it a year or so ago in E.Saruta by trying to find the ID for a treasure casket in a given area, then using a random number to determine if it popped on kill or not, but I don't recall ever having success. I'm not looking to emulate the number guessing game part of it, just to have a lootable chest. I believe I tried to use similar methods to what was in limbus at the time but produced nothing but error messages.
Third question:
I attempted to add the script for walahra water the other night and have been unable to get it working. I've added a script for it, checked settings in item_basic and item_usable and I still just get "unable to use item" when using. I then copied all the values from a standard potion to the SQL files and .lua file to rule out coding errors on my end, and same deal. Am I forgetting something simple?
thank you in advance for any help or advice you can spare.
First question:
Is there a method for dynamically adjusting the level range of mobs in an area (either on next respawn or instantly) based on a variable like a player level or length of battle?
I dug into the mobentity files looking for functions I might be able to use, and tried SetMLevel(); but had no luck. Would anyone have a suggestion on how to do this via a script? I'm looking to have mobs spawn based on the level of a player when they zone in to an area or after they make a kill, and don't want the permanence that would come with editing the min/max values in the database.
Second Question:
Is anyone familiar with the process behind making treasure caskets spawn? I tried playing around with it a year or so ago in E.Saruta by trying to find the ID for a treasure casket in a given area, then using a random number to determine if it popped on kill or not, but I don't recall ever having success. I'm not looking to emulate the number guessing game part of it, just to have a lootable chest. I believe I tried to use similar methods to what was in limbus at the time but produced nothing but error messages.
Third question:
I attempted to add the script for walahra water the other night and have been unable to get it working. I've added a script for it, checked settings in item_basic and item_usable and I still just get "unable to use item" when using. I then copied all the values from a standard potion to the SQL files and .lua file to rule out coding errors on my end, and same deal. Am I forgetting something simple?
thank you in advance for any help or advice you can spare.