-
Content Count
618 -
Joined
-
Last visited
-
Days Won
15
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Mumbles
-
Quest Points to Item Exchanger
Mumbles replied to Mumbles's topic in Quest, Shops, Functions & Algorithms Releases
I wrote this script many years ago in response to a request, and it doesn't look like I designed it to be reconfigurable in that direction in a user-friendly manner. Some operations needed to be flipped around for the requested effect. You can view the diff for that here: https://www.diffchecker.com/PlW5DQYU/ I have uploaded an alternate version of this script that converts points to items, 10:1. You can download it here: https://github.com/datmumbles/Scripts/blob/master/util/points2item_v1.0a.txt Now you should be able to change the value of .rate and it will convert the way you wanted. I also realize @XtriC asked for this particular function many years ago, and I hadn't realized it wasn't going to do what he asked. Four years late, but this is the solution lol -
Quest Points to Item Exchanger
Mumbles replied to Mumbles's topic in Quest, Shops, Functions & Algorithms Releases
If you want to change the rate of points per PoD, just change: .rate = 20; to your desired rate, in which case would be: .rate = 10; It is located on Line 129, under the Configuration heading. -
This is actually so annoying that it works without any real explanation as to why
-
Well...this was your first mistake. This is a script-based atcommand utility; it should be loaded as a custom .txt script. Copy the original file I provided and add its location to npc/scripts_custom.conf; doing this will override the src-based atcommand when your server initializes. I think you might have misunderstood the way the script functions. Aliases included in the alias() function serve to allow a player to type multiple different variants of a phrase to arrive at the same location. An example in your case: alias("36", "glast", "gh") ...would allow the player to type: @go "36" @go "glast" @go "gh" ...and still arrive at the same map and coordinates that you set for that alias. You seem to have added the alias name in the go() function instead of the map name. The correct way to add an @go point for glast_01 would be to include the map_name in the go() function. Try this: go("glast_01", 370, 304, 0, 0, .cost); Hope this resolves your issue. Please note that I wrote this script-based atcommand utility several years ago; I have not kept up with Hercules's progress, so this information may be entirely deprecated. However, if you are running a version of Hercules where this script was still compatible, my corrections should suffice. Good luck!
-
identifyall was solely added as an atcommand, wasn't it? I made this as a script-command based on reiterations of identify() so users could make an inline function in their quest, event, or utility scripts. The benefits are trivial and would mostly suit low-rate servers with a low zeny pool, but they're beneficial nonetheless. ¯\_(ツ)_/¯ This script-command version of identifyall() provides the following: A return value for the number of items identified Enables the possibility of using the amount of items identified to create individual cost or bulk pricing i.e. 10 items identified for 400 Z (base cost for 10x items identified @ 40 Z each) i.e. 23 items identified for 805 Z (bulk cost for 23x items identied @ 35 Z each, when identifying 20 or more at once) Allows for the number of items identified (and the maths on cost) to be displayed to the user, for informational purposes Eliminates redundant scripting by alternatively using atcommand "@identifyall"; in a script and still needing to gather the number of items identified Allows for use of identifyall as a script-command rather than an atcommand, particularly under circumstances when using atcommands in general are restricted, limited, or undesirable With some modification, this can be changed into a global function so it can be used across multiple scripts With a little imagination and creativity, identifyall as a script-command can be used for interfacing with various utilities, zeny sinks, and other features. Like I said -- this little script command would find its niche mostly in low-rate servers, but it'll be here if it's needed.
-
Function: identifyall() Quick function to complement commit #24c4d53. Full version: Identifies all unidentified items in user's inventory and returns the number of items identified. Quick-use version: Identifies all unidentified items in user's inventory without returning any additional values. Usage: Download: identifyall.txt Mirror: https://upaste.me/f75351070d03c790e
-
If anyone came crying, it'd appear to be you. To answer your question, though -- no; I just had the misfortune of coming across your cancerous post on the front page. Poor you -- you wasted a whole few moments of your pathetic life waiting for something that was free; of no cost to you whatsoever. And for all your efforts, you didn't get it. Geez. How sad. I've collaborated with Daifuku in the past, and I've admittedly pushed her limits in order to meet a deadline -- but never once did I disrespect her or cause her to feel like abandoning a project was a better solution. You've got to be a pretty foul human being to make someone as nice as her pass on you. If you want a prize, take a life lesson instead as a consolation: Treat people with dignity and respect, and maybe next time you won't be such a loser.
-
People get busy; we all have lives outside of these boards (believe it or not), and it should be expected that our real-world responsibilities and obligations take precedence over our business online. You obviously had your own priorities (in this case, your health), and were unable to contact Daifuku in a timely manner to redeem your prize. Fortunately, she was still willing to work with you instead of choosing a runner-up. Considering that she had been willing to be flexible with you a month after the fact, you should have been similarly acquiescent when she had contacted you a few days after the date she said she'd respond by — but instead, you harassed her to the point that she ultimately rescinded her giveaway. I haven't posted here in years, but seeing this post was triggering. To say that Hercules deserves better is ridiculous and insulting. Hercules holds a high standard for staff members; Daifuku wouldn't have earned her position if she wasn't of good moral character, untalented, or undeserving. If anything, Daifuku deserves better than to be treated like some sort of servant. Did you lose anything of value by entering her giveaway? Did you lose sleep while you were waiting for a response? I'd hope not. Maybe evaluate how you communicate with people when they are doing something out of their own free will and generosity — especially when it's at no cost to you.
-
Quest Points to Item Exchanger
Mumbles replied to Mumbles's topic in Quest, Shops, Functions & Algorithms Releases
Change the value of .rate under Config -
Here's an updated version without global variables and a simplified flow: - script vaporize -1,{ OnPCLoginEvent: // Set AFK check on login addtimer 60000, strnpcinfo(0) + "::On1min"; end; On1min: // Check if player has Homunculus and if AFK longer than allowed if(gethominfo(2) != "null" && checkidle() >= .vaporize) { atcommand "@useskill 244 1 " + strcharinfo(0); dispbottom "You are not allowed to farm with Homunculus while AFK."; } // Reset AFK check addtimer 60000, strnpcinfo(0) + "::On1min"; end; OnInit: // Time (in seconds) before vaporizing .vaporize = 120; end; }
-
This code might be deprecated. If it does still work, it should overwrite the existing functionality of @go. When this was written, you did not need to make any src changes, as bindatcmd binded @go to the specified label within the script.
-
In previous versions (not sure if still possible), you could pre-load a script in npc/scripts_custom.conf and it could potentially affect the next script in line if it wasn't closed properly. Example: npc: npc/custom/npc1.txtnpc: npc/custom/npc2.txt If npc/custom/npc1.txt was missing a right curly at the end of the file, it would still load, but the next file in line (in this example, npc/custom/npc2.txt) would throw an error at line 1. Just throwing that idea out there; it very well might not be the solution to your problem, but there's nothing wrong with making sure all of your custom scripts have no errors. d:
-
What's the file above it, in npc/vroevents/ ? Might be missing a right curly at the end of that file.
-
Or you could just not @reloadscript lol But anyway, here you go: http://upaste.me/2f9618109227d4fcd
-
Did you read the second part? o.O
-
You're over-thinking your implementation. On a smaller scale, you could write something like: - script summon_mvp -1,{ OnInit: monster "prt_fild08", 0, 0, "Baphomet", BAPHOMET, 1, strnpcinfo(0) +"::OnKilledBapho"; end; OnKilledBapho: announce strcharinfo(0) +" has killed "+ getmonsterinfo(BAPHOMET, MOB_NAME) +"!", bc_all; end;} ...but since you've already specified a very particular event (OnKilledBapho) for your Baphomet mob, you don't really need to pull the RID to display the name, nor do you even need to use getmonsterinfo(). Since you told the script to run OnKilledBapho when the event Baphomet is killed, you could just simply write your announcement like this: announce strcharinfo(0) +" has killed Baphomet!", bc_all; If you were randomizing MVP summons, however, you could do something like this: - script summon_mvp -1,{ OnInit: // Set MVP IDs setarray .mvp_id[0], BAPHOMET, GOLDEN_BUG, KNIGHT_OF_WINDSTORM, GARM, ORK_HERO; OnSetID: // Randomly select MVP to summon .summon_id = .mvp_id[rand(getarraysize(.mvp_id))]; // Summon Random MVP monster "prt_fild08", 0, 0, getmonsterinfo(.summon_id, MOB_NAME), .summon_id, 1, strnpcinfo(0) +"::OnKilledMVP"; end; OnKilledMVP: // Announce MVP death announce strcharinfo(0) +" has killed "+ getmonsterinfo(.summon_id, MOB_NAME) +"!", bc_all; // Respawn new MVP donpcevent strnpcinfo(3) +"::OnSetID"; end; }
-
So the documentation for nowarpto is correct, then; lost track of what the original issue was for a sec lol. In your last reply, you mentioned replacing mf_nowarp with mf_nowarpto: } else if (getgroupid() < getarg(4) || getmapflag(getarg(0), mf_nowarp)) { However, the intent of this line is to prevent warping if the player's Group ID isn't high enough OR if the destination has a nowarp flag, regardless of Group ID. You can bypass this for GMs by changing the expression a little (I'm sure there's a prettier way to do it, but I'm not feeling up to it): } else if (getgroupid() < getarg(4) || getmapflag(getarg(0), mf_nowarp) && getgroupid() < getarg(4)) { In regard to your original inquiry, the behaviour of nowarp is to prevent the use of @go to a destination; to prevent the use of @go from a map flagged with nowarp (despite this not being the intent of the nowarp flag), you can still prevent warping by adding an expression similar to my original suggestion: } else if (getmapflag(strcharinfo(3), mf_nowarp)) { message strcharinfo(0), "You are not authorised to warp from this map."; If you would like to prevent warping from specific maps, I would recommend moving forward with the filter/blacklist route — hell, you could even prevent both nowarp-flagged and specific maps from being warped to if you wanted to.
-
Can you please confirm (via in-game test) that nowarpto prevents this version of @go from warping to a map flagged with nowarpto, and that nowarp prevents warping from a map flagged with nowarp? I am unable to test any in-game behaviours at this time.
-
You could probably do without getmapxy() since the script is attached to a player when run; strcharinfo(3) will return the attached player's map name. I'd say you were correct in changing mf_nowarp to mf_nowarpto, should the function of nowarpto be that players cannot warp to the map (duh; though sometimes the documentation isn't tell-all). Someone should really update the documentation for both mapflags, as they are either lacking in information or documented incorrectly. /swt
-
Hi Kong, Per mf_nowarp's documentation (see nowarp.txt), mf_nowarp prevents the use of @go to a map, not from it. There is currently no mapflag (that I'm aware of) that prevents warping from the map, but you can circumvent this by either adding your own blacklist/filter of disabled maps. This is an example of a blacklist injection (though I wouldn't recommend punching this into this script exactly as it is written): setarray .@blacklist$[0], "payon", "prontera", "izlude";for (.@i = 0; .@i < getarraysize(.@blacklist$); .@i++) { if (strcharinfo(3) == .@blacklist$[.@i])) { message strcharinfo(0), "You may not warp from this map."; end; }}
-
Hi Kong, Thanks for the feedback. I'll push an update when I get back to my desk; for now, you can add this block of code at line 62 to accommodate your needs: } else if (getmapflag(getarg(0), mf_nowarp)) { message strcharinfo(0), "You are not authorised to warp to this map.";
-
You can use the monster command after the line containing the progressbar command.
-
This will not work with *Athena emulators until they add compatibility for item constants (in place of IDs); this script is optimised for Hercules emulators only.1 1If you are using Hercules, please update your emulator.