-
Content Count
618 -
Joined
-
Last visited
-
Days Won
15
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Mumbles
-
That sets the range of a random number from 1 to 100 to be rewarded in zeny.
-
In all truth, I know very little about how libconfig works, but it might be reading off as a double negative? For example, if Law Enforcement inherits a permission group that can't trade, GM Chief inherits that can_trade: false setting. Here, you set GM Chief and Co-Admin to also have can_trade: false while inheriting permissions from other groups that already can't trade. Since they inherit a lower group's permissions, why would you need to define it again? tl;dr: Try removing any duplicate can_trade: false from groups that inherit or have that same permission setting.
-
Fill the array .monster with monster IDs that you would like to be affected by the zeny bonus; you can set the zeny range with .min and .max. If you load this script on a live server, whisper anything to npc:mobzeny to initialize the settings; you will have to do this every time you manually load the script into your server. - script mobzeny -1,{ OnNPCKillEvent: // Get zeny if monster killed is listed for (.@i = 0; .@i < getarraysize(.monster); .@i++) { if(killedrid == .monster[.@i]) { .@mobzeny = rand(.min, .max); Zeny += .@mobzeny; message strcharinfo(0), "You received "+ .@mobzeny +" for killing "+ getmonsterinfo(.monster[.@i], 0) +"!"; } } end; OnWhisperGlobal: // Whisper anything to initialize settings message strcharinfo(0), strnpcinfo(1) +" : 'OnInit' label has been intialized."; OnInit: // List of monster IDs setarray .monster[0], 1001, 1002 , 1004, 1005; // Set zeny range .min = 1; // Minimum .max = 100; // Maximum end; }
-
Update: Revised the algorithm to determine success rate. Please re-download the file for the newest version.
-
Update: Revised the algorithm to determine success rate. Please re-download the file for the newest version.
-
Yeah. Just think of each set like a fraction; 1/5 = 20%, 1/2 = 50%, 4/5 = 80%, 1/50 = 2%, and so on.
-
Here's a similar yet more dynamic version of your request: http://herc.ws/board/topic/1893-utility-variant-mining/
-
Utility: Variant Mining As per xienne15's request: http://herc.ws/board/topic/1886-simple-mining/ Description: A simple mining system; allows for interacting players to excavate minerals by "mining" them with special equipment and tools. Minerals disappear and respawn randomly; chance is determined by configuration. Configuration is mostly done in arrays so that settings may be changed with no modifications to the script. Duplicate in additional locations as needed; update the value of '.var_amount' correspondingly. Download: https://github.com/datmumbles/Scripts/raw/master/util/mining.txt
-
You can use misceffect or specialeffect for this waterfall effect. The IDs for the waterfalls are ranged from 349 to 356; see doc/effect_list.txt for a full list of effects.
-
Your left curly on line 61 is mismatched. It shouldn't even be there. Also, you're checking if the player has -1 of the item 26131; I think it's safe to assume you meant to check if the player had at least 1 of the item. if (countitem(26131) < 0) { goto noring; I could rant about why you shouldn't use goto, but to put it simply: it's just bad code - and wasn't used properly, at that. You can't (or shouldn't, if for some reason you can) use a goto within a function. Instead, remove the checks from each case and place it outside of the function call. I added the check after line 26, before the player is given the shop menu selection. You can replace the contents of the check's script with what you had in your noring label. mes "[Training Trader]";mes "Each shop use different training points acquired from your training";next; // <- Line 26 [Via] .@coin = 26131; // Coin item ID.@amount = 1; // Amount required // Check coinsif (countitem(.@coin) < .@amount) { mes "[Training Trader]"; mes "You need at least "+ .@amount +" "+ getitemname(.@coin) +" to access these shops. Come back later."; close;}
-
Thank you all for trying it out! If you have any questions or suggestions, please don't hesitate to write me. c:
-
prohibit monsters in a map to go to a certain area of the same map
Mumbles replied to xienne15's question in Script Requests
My mistake; I used OnTouch instead of OnTouchNPC; here's an updated version: // Since this script should only be triggered by touch, we can set the Sprite ID to -1 (invisible)// The extra "5,5," signifies a 5-by-5 cell area around the NPC that will trigger the 'OnTouch' labelprontera,151,172,0 script no_mob_walk -1,5,5,{ //end; // Uncomment this line if you use a visible sprite OnTouchNPC: // Triggers when the defined area is walked into unitwarp 0, "this", -1, -1; // Warps invoking monster to random cell on the same map end;} -
"this" is the current map.
-
prohibit monsters in a map to go to a certain area of the same map
Mumbles replied to xienne15's question in Script Requests
Here's an example: // Since this script should only be triggered by touch, we can set the Sprite ID to -1 (invisible)// The extra "5,5," signifies a 5-by-5 cell area around the NPC that will trigger the 'OnTouch' labelprontera,151,172,0 script no_mob_walk -1,5,5,{ //end; // Uncomment this line if you use a visible sprite OnTouch: // Triggers when the defined area is walked into unitwarp 0, "this", -1, -1; // Warps invoking player/monster to random cell on the same map end;} -
Sample site appears to be down. Does anyone have a mirror? I'd like to see this control panel. d:
- 13 replies
-
- cp
- control panel
- (and 5 more)
-
Oh wow. I hadn't quite thought of using negative values. While 256-ish is great, unlimited arrays would be amazing. *__*
-
Thanks Yommy; I try.
-
The problem right off the bat is how you're writing the expression for your if statement. You can't separate expressions in parentheses and compare them that way; you'd have to have another set of parentheses enclosing the entire expression. The proper way to write your (improper) check would be: if(.@disguise == 0 || .@disguise < 1001 || .@disguise > 2082 || .@disguise == .@blacklist[0]) Now, this is still wrong because the blacklist isn't being checked the way you want it to. Here, you should use a loop and a variable to keep count of incrementation. By this, I mean changing .blacklist[0] into .blacklist[.@i]. Replace this: if( .@disguise == 0 ) || ( .@disguise <= 1001 ) || ( .@disguise >= 2082 ) || ( .@disguise == .@blacklist[0] ){goto choose_one;close;} With this: for(.@i = 0; .@i < getarraysize(.blacklist); .@i++){ if(.@disguise == 0 || .@disguise < 1001 || .@disguise > 2082 || .@disguise == .@blacklist[.@i]) { mes "[ ^ffa500Master of Disguise^000000 ]"; mes "Sorry, the ID you chose is either unavailable or blacklisted."; close; }} Here, we're enclosing our if statement inside of a for loop. What this for loop does is check each value of your .blacklist array until it has gone through each and every value. Fill your array with monster IDs, like this: .blacklist[0], 1001, 1002, 1003, 1004, 1005; Keep in mind that you can only store up to 128 values in an array (though if this has changed, someone please correct me). For more on the if statement, loops, and arrays, please refer to the Wiki; it's quite useful for referencing. http://herc.ws/wiki/If http://herc.ws/wiki/Loops http://herc.ws/wiki/Array
-
Set trans job level 70 minimum to change job
Mumbles replied to ToiletMaster's question in Script Support
You could change 50 to 70 in this line: setarray .Rebirth[0],99,50; // Minimum base level, job level to rebirth OR change to third class The problem with this, however, is that it (more likely than not) will cause the script to require that you Rebirth with 50 Job Levels, where (in common cases), 50 is the maximum Job Level for Second and Advanced classes. You'd probably be better off modifying the script to take a third value from the .Rebirth array and adding a check for that value. Example modifications: setarray .Rebirth[0],99,50; // Minimum base level, job level to rebirth OR change to third class setarray .Rebirth[0],99,50,70; // Minimum base level, job level to rebirth OR change to third class if (Class > 21) { Job_Menu(roclass(.@eac|EAJL_THIRD)); close; } if (Class > 21 && BaseLevel >= Rebirth[0] && JobLevel == .Rebirth[2]) { Job_Menu(roclass(.@eac|EAJL_THIRD)); close; } Idk, this script is pretty messy to begin with and is kind of hellish to read, but a proper modification can be made if you punch in your check at the right spot. The second part of my example modifications is purely in theory; I have not tested it. -
I have revised this script; the content of the linked page in my original post has since been updated to reflect these changes.
-
I was going to add a little check for you, but your method was a little frustrating to look at - no offense. Here's a revised version; it's a bit more optimized and heavily commented. Hope you like it. http://herc.ws/board/topic/1721-utility-hercules-radio/
-
Utility: Hercules Radio As per youtube's request: http://herc.ws/board/topic/1676-rhelp/ Description: A radio NPC that plays preset selection of client-side songs (these songs are to be placed in the 'BGM' folder). The command '@radio' was added as a convenience, to allow songs to be played wherever the invoking player may be. Songs are played on the map in which the NPC was invoked, meaning that if a player is in pay_gld and types '@radio', (s)he and everyone on the map will hear the selected song. Each time a song is played, a lock is set for the preset minutes; this lock prevents the NPC from being accessed. A countdown in minutes and seconds is be displayed to reflect the remaining time until the next song can be played. Download: https://github.com/datmumbles/Scripts/raw/master/util/radio.txt
-
Use message. I'm assuming your script contains a variable in which the target player's name is stored (i.e. .@playerName$), so you can include a message for them after the script has sent a gift - regardless of whether or not they are online (if they're online, they'll receive it). Example: message .@playerName$, "A GM has sent you a gift. Please relog to receive it.";
-
Just to clarify, does the obsolescence of the 3rdparty folder mean that tables are created automatically (so long as MySQL is installed)?
-
True simplicity is derived from so much more than just the absence of clutter and ornamentation; it’s about bringing order to complexity.