-
Content Count
618 -
Joined
-
Last visited
-
Days Won
15
Reputation Activity
-
Mumbles got a reaction from Dduwsmitt in item script to add max weight
I suppose I couldn't have expected that to be a permanent substitute. Moving this to Source Requests.
-
Mumbles got a reaction from Hadeszeus in Help to put auto repair on my healer and indentify
I'm just nitpicking, but why not use a for loop since it's counter-controlled anyway?
for (.@i = 0; .@i < @inventorylist_count; .@i++) { if (!@inventorylist_identify[.@i]) { delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0; getitem @inventorylist_id[.@i],1; } }
Also, it might be nice to add in a visual effect for that repair (and enclose it in curly braces, because one-liners is just bad coding habit):
if (getbrokenid(1)) { specialeffect2 EF_REPAIRWEAPON; repairall; } -
Mumbles reacted to Jaburak in Help to put auto repair on my healer and indentify
- script healtest -1,{ .@price = 0; // Zeny required for heal .@Buffs = 1; // Also buff players? (1: yes / 0: no) .@Delay = 1; // Heal delay, in seconds if( getbrokenid(1) ) repairall; getinventorylist; while( .@i < @inventorylist_count ){ if ( !@inventorylist_identify[.@i] ){ delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0; getitem @inventorylist_id[.@i],1; } .@i++; } if (@HD > gettimetick(2)) end; if (.@price) { message strcharinfo(0),"Healing costs "+.@price+" Zeny."; if (Zeny < .@price) end; if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) close; Zeny -= .@price; } specialeffect2 EF_HEAL2; percentheal 100,100; if (.@Buffs) { specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI,360000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,360000,10; } if (.@Delay) @HD = gettimetick(2)+.@Delay; close;OnInit: waitingroom "Healer",0;} -
Mumbles got a reaction from cJei in Coin Trader
Utility: Coin Trader
As per @karazu's request: http://herc.ws/board/topic/4157-mithrill-to-gold-to-silver-coins-vice-versa-trader/
Description:
Allows players to purchase coins with zeny, exchange coins for zeny, and convert coins to more valuable or lesser coins. See configuration to customise coin values.
Download:
https://github.com/datmumbles/Scripts/raw/master/util/cointrader.txt
-
Mumbles got a reaction from somale in Coin Trader
Utility: Coin Trader
As per @karazu's request: http://herc.ws/board/topic/4157-mithrill-to-gold-to-silver-coins-vice-versa-trader/
Description:
Allows players to purchase coins with zeny, exchange coins for zeny, and convert coins to more valuable or lesser coins. See configuration to customise coin values.
Download:
https://github.com/datmumbles/Scripts/raw/master/util/cointrader.txt
-
Mumbles got a reaction from Hadeszeus in Instant Third-Class Jobs
This will only prompt players if they do not have the variable auto_third set; if they've already selected their job once, they won't encounter the message anymore. However, if you're loading this (as it is) into a live server, pre-existing players will also be prompted, even if they already have their class of choice. To prevent this from happening, change this line:
if(auto_third) {
to this:
if(auto_third || Class) { -
Mumbles got a reaction from BFPkiller in Instant Third-Class Jobs
This will only prompt players if they do not have the variable auto_third set; if they've already selected their job once, they won't encounter the message anymore. However, if you're loading this (as it is) into a live server, pre-existing players will also be prompted, even if they already have their class of choice. To prevent this from happening, change this line:
if(auto_third) {
to this:
if(auto_third || Class) { -
Mumbles reacted to evilpuncker in converter npc :)
try this:
http://herc.ws/board/topic/4055-utility-points-to-item-exchanger/
-
Mumbles got a reaction from leloush in how to use cutin[without player attached]?
Ah, you found another one of my mistakes lol. Change this:
cutin .@image$[.@i], 2;
to this:
cutin .@image$[.@x], 2;
...or just see my other post for the updated version.
-
Mumbles got a reaction from leloush in how to use cutin[without player attached]?
Here's an example:
prontera,150,150,0 script Sample 100,{ // Cutin file names (plays in reverse order) setarray .@image$[0], "kafra_05", "kafra_06", "kafra_07"; // Countdown time (in seconds) .@time = 3; // Map name to play cutins on .map_name$ = "prontera"; // Generate array with account IDs query_sql "SELECT DISTINCT(`account_id`) FROM `char` WHERE `online` = '1'", .@aid; // Loop through countdown sequence for (.@x = .@time; .@x > 0; .@x--) { // Loop through all online players in map for (.@i = 0; .@i < getarraysize(.@aid); .@i++) { if (attachrid(.@aid[.@i])) { if (strcharinfo(3) == .map_name$) { cutin .@image$[.@x], 2; } } } announce "Count down : " +.@x, 0; sleep 1000; } // Clear cutins for (.@y = 0; .@y < getarraysize(.@aid); .@y++) { if (attachrid(.@aid[.@y])) { if (strcharinfo(3) == .map_name$) { cutin "", 255; } } } end; } -
Mumbles got a reaction from WalkingBad in Can I request this awesome script? I hope it's easy
Here's a version that supports multiple items:
prontera,150,150,0 script testwarp WARPNPC,1,1,{ message strcharinfo(0), "You touched me!"; /*----------------------------------------------------- Configuration -----------------------------------------------------*/ OnInit: // Item constant/ID, amount setarray .item_id[0], Jellopy, 1, Clover, 5, Fluff, 10; // Warp destination .warp_map$ = "prontera"; .warp_x = 155; .warp_y = 179; end; /*----------------------------------------------------- Script -----------------------------------------------------*/ OnTouch: // Check items for (.@i = 0; .@i < getarraysize(.item_id); .@i += 2) { if (countitem(.item_id[.@i]) < .item_id[.@i + 1]) { message strcharinfo(0), "You need the following items to access this warp:"; for (.@j = 0; .@j < getarraysize(.item_id); .@j += 2) { message strcharinfo(0), .item_id[.@j + 1] +" "+ getitemname(.item_id[.@j]); } message strcharinfo(0), "Access denied."; end; } } // Delete items for (.@i = 0; .@i < getarraysize(.item_id); .@i += 2) { delitem .item_id[.@i], .item_id[.@i + 1]; } // Warp player warp .warp_map$, .warp_x, .warp_y; end;} -
Mumbles got a reaction from WalkingBad in Can I request this awesome script? I hope it's easy
Why would it be? OnPCLoadMapEvent doesn't run until the player is already on the map. Your example would leave the player on the map itself after simply prompting them that they needed to have something to be there; then with that close, they'd walk happily off, confused as to why they were even told such a thing.
Mhalicot's approach was on the right track, but I believe the topic starter would something more seamless. Here's my method:
prontera,150,150,0 script testwarp WARPNPC,1,1,{ /*----------------------------------------------------- Configuration -----------------------------------------------------*/ OnInit: .item_id = Jellopy; .item_amount = 1; .warp_map$ = "prontera"; .warp_x = 155; .warp_y = 179; end; /*----------------------------------------------------- Script -----------------------------------------------------*/ OnTouch: if (countitem(.item_id) < .item_amount) { message strcharinfo(0), "You need "+ .item_amount +" "+ getitemname(.item_id) +" to access this warp."; } else { delitem .item_id, .item_amount; warp .warp_map$, .warp_x, .warp_y; } end;} -
Mumbles got a reaction from pan in Can I request this awesome script? I hope it's easy
The more you know. Brought up some good points though. d:
-
Mumbles got a reaction from pan in Can I request this awesome script? I hope it's easy
Yeah, but OnPCLoadMapEvent runs through all maps that have a loadevent mapflag, which can cause high stress on the server when several players load those maps continuously. Understandably, there are some scenarios where a map isn't accessed by warp portal and OnPCLoadMapEvent would be appropriate; however, in this case the topic starter simply wanted a portal for quest-like purposes (and likely seamless integration). Sure, you'd have to disable existing warps that you would replace this "quest warp" with, but it would make sense that this tedium would be found in sensible applications, such as blocking off all warp-portal entrances into Morroc or something - and even so, this can be done by using duplicate to copy your script over without actually having to add another file/script.
-
Mumbles got a reaction from pan in Can I request this awesome script? I hope it's easy
I typically wouldn't place OnInit overhead, but due to the behaviour of the WARPNPC sprite, its script won't be run when clicked upon. Add this line above the OnInit label and see for yourself:
message strcharinfo(0), "You touched me!";
However, I do concede that it would be good habit to throw an end up there in any similar situation.
-
Mumbles reacted to pan in Can I request this awesome script? I hope it's easy
I see. Oh, and I think that after the header you should put an 'end;', if the script stays this way every time someone clicks the warp it will execute everything that's under OnInit's scope, that's unnecessary overhead. Thank you for your answer.
-
Mumbles got a reaction from KodoKTempuR in Req> NPC Gatcha
Here's a version that pulls a "rare" item from the array .rare_id and determines whether or not you have received it, defined by the chance allocated after it (format: <item constant/ID>, <chance>):
prontera,147,174,5 script Odd Fellow::randomstuff 1_M_WIZARD,{ /*----------------------------------------------------- Script -----------------------------------------------------*/ mes .npc_name$; mes "Hello there! For "+ .coin_amount +" "+ getitemname(.coin_id) +", I'll give you a random item!"; next; mes .npc_name$; if (countitem(.coin_id) < .coin_amount) { mes "Come back when you have "+ .coin_amount +" "+ getitemname(.coin_id) +"!"; close; } mes "Would you like to give it a try?"; next; if (select("Sure, why not!:No, thanks") == 2) { mes .npc_name$; mes "Okay, come back if you change your mind!"; close; } // Generate random prize ID do { .@prize_id = rand(.prize_min_id, .prize_max_id); } while (getitemname(.@prize_id) == "null"); // Determine index location of rare item to randomly pick from do { .@rare_index = rand(getarraysize(.rare_id)); } while (.@rare_id % 2); // Determine whether or not to change prize to rare item if (!rand(.rare_id[.@rare_index + 1])) { .@prize_id = .@rare_id; } mes .npc_name$; mes "Here you go! You got "+ .prize_amount +" "+ getitemname(.@prize_id) +"!"; getitem .@prize_id, .prize_amount; close; /*----------------------------------------------------- Configuration -----------------------------------------------------*/ OnInit: .npc_name$ = "[Odd Fellow]"; .coin_id = Poring_Coin; // Coin constant/ID .coin_amount = 1; // Count amount required .prize_min_id = 501; // Prize minimum ID .prize_max_id = 30000; // Prize maximum ID .prize_amount = 1; // Prize amount rewarded // Rare item constants/IDs and chance in x to obtain rare item (default: 5 [20%]) setarray .rare_id[0], Apple, 10, Red_Potion, 20, Jellopy, 30, Fluff, 4, Clover, 5; end;} -
Mumbles got a reaction from pan in Encrypt grf
I apologise if this is naive of me to say, but couldn't you just open GRF Editor's properties and have it run in Compatibility Mode for Windows 7? I haven't tried this myself but it would make sense.
-
Mumbles got a reaction from Patskie in Req> NPC Gatcha
Here, give this a try:
prontera,147,174,5 script Odd Fellow::randomstuff 1_M_WIZARD,{ /*----------------------------------------------------- Script -----------------------------------------------------*/ mes .npc_name$; mes "Hello there! For "+ .coin_amount +" "+ getitemname(.coin_id) +", I'll give you a random item!"; next; mes .npc_name$; if (countitem(.coin_id) < .coin_amount) { mes "Come back when you have "+ .coin_amount +" "+ getitemname(.coin_id) +"!"; close; } mes "Would you like to give it a try?"; next; if (select("Sure, why not!:No, thanks") == 2) { mes .npc_name$; mes "Okay, come back if you change your mind!"; close; } do { .@prize_id = rand(.prize_min_id, .prize_max_id); } while (getitemname(.@prize_id) == "null"); mes .npc_name$; mes "Here you go! You got "+ .prize_amount +" "+ getitemname(.@prize_id) +"!"; delitem .coin_id, .coin_amount; getitem .@prize_id, .prize_amount; close; /*----------------------------------------------------- Configuration -----------------------------------------------------*/ OnInit: .npc_name$ = "[Odd Fellow]"; .coin_id = Poring_Coin; // Coin ID .coin_amount = 1; // Count amount required .prize_min_id = 501; // Prize minimum ID .prize_max_id = 30000; // Prize maximum ID .prize_amount = 1; // Prize amount rewarded end;} -
Mumbles got a reaction from Yugosh in Req> NPC Gatcha
Here, give this a try:
prontera,147,174,5 script Odd Fellow::randomstuff 1_M_WIZARD,{ /*----------------------------------------------------- Script -----------------------------------------------------*/ mes .npc_name$; mes "Hello there! For "+ .coin_amount +" "+ getitemname(.coin_id) +", I'll give you a random item!"; next; mes .npc_name$; if (countitem(.coin_id) < .coin_amount) { mes "Come back when you have "+ .coin_amount +" "+ getitemname(.coin_id) +"!"; close; } mes "Would you like to give it a try?"; next; if (select("Sure, why not!:No, thanks") == 2) { mes .npc_name$; mes "Okay, come back if you change your mind!"; close; } do { .@prize_id = rand(.prize_min_id, .prize_max_id); } while (getitemname(.@prize_id) == "null"); mes .npc_name$; mes "Here you go! You got "+ .prize_amount +" "+ getitemname(.@prize_id) +"!"; delitem .coin_id, .coin_amount; getitem .@prize_id, .prize_amount; close; /*----------------------------------------------------- Configuration -----------------------------------------------------*/ OnInit: .npc_name$ = "[Odd Fellow]"; .coin_id = Poring_Coin; // Coin ID .coin_amount = 1; // Count amount required .prize_min_id = 501; // Prize minimum ID .prize_max_id = 30000; // Prize maximum ID .prize_amount = 1; // Prize amount rewarded end;} -
Mumbles got a reaction from MikZ in Instant Third-Class Jobs
Utility: Instant Third-Class Jobs
As per spectator's request: http://herc.ws/board/topic/882-rinstant-job-changer/
Description:
Allows player to choose a third-class job upon initial login; if the player fails to choose a class for any reason, (s)he will be prompted again upon next login.
Download:
https://github.com/datmumbles/Scripts/raw/master/util/thirds.txt
-
Mumbles reacted to goddameit in Dedicated NPC [v.3]
Preview :
http://bit.ly/Z0ECZx
Introduction :
You can hire this npc, it will follow you and give you buff.
Download :
dedicated_npc_3.txt
More NPC :
First add new npc like this:
,,,duplicate(DedicatedNPCMain)Add new name define into .npc_name$setarray .npc_name$[0],"Dedicated Poring AAA","Dedicated Poring BBB","Dedicated Poring CCC"; Time Set :
60 seconds
set getvariableofnpc(.npc_time[@id_use],"DedicatedNPCTimer"),gettimetick(2)+60; Update :
2014/02/27 : http://herc.ws/board/topic/4107-dedicated-npc-v2/?p=27298
http://rathena.org/board/topic/74607-dedicated-npc-v2/?p=244414
2014/01/24 : Rewrite timer and npc runner.
Edit :
No repairall? >> reply
-
Mumbles got a reaction from Dduwsmitt in Points to Item Exchanger
Utility: Points to Item Exchanger
As per @koji42's request: http://herc.ws/board/topic/4048-pods-cashpoints-convertion/
Description:
Exchanges items for points and vice-versa at a fixed rate.
Preview:
Download:
https://github.com/datmumbles/Scripts/raw/master/util/points2item.txt
-
Mumbles got a reaction from Patskie in getcharname()
Update (for Patskie, really):
As of 82b583b, array sizes are virtually limitless.
-
Mumbles got a reaction from Zia in Points to Zeny Exchanger
Utility: Points to Zeny Exchanger
As per themon's request: http://herc.ws/board/topic/2774-zeny-to-cash-point/
Description:
Allows players to exchange points for zeny and vice-versa. Point variable, exchange rate, and minimum exchange can be configured easily below the 'OnInit' label.
Optimised for Hercules emulators.
Download:
https://github.com/datmumbles/Scripts/raw/master/util/points2zeny.txt