-
Content Count
366 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Patskie
-
The constants being used in Hercules is not the same in rAthena. Try below script //===== Hercules Script ====================================== //= Healer //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.2 //===== Description: ========================================= //= Basic healer script. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Aligned coordinates with @go. //= 1.2 Fix variables and character stuck at healing //============================================================ - script Healer FAKE_NPC,{ .@price = 0; // Zeny required for heal .@Buffs = 1; // Also buff players? (1: yes / 0: no) .@Delay = 3; // Heal delay, in seconds if (@HD > gettimetick(2)) end; if (.@price) { message strcharinfo(PC_NAME),"Healing costs "+.@price+" Zeny."; if (Zeny < .@price) end; if(select("^0055FFHeal^000000", "^777777Cancel^000000") == 2) close; Zeny -= .@price; } percentheal 100,100; getinventorylist; for( set .@i,0; .@i < @inventorylist_count; set .@i, .@i + 1 ) { if ( @inventorylist_identify[.@i] == 1 ) continue; delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0; getitem @inventorylist_id[.@i],1; } // Remove negative status effects //for ( .@i = 0; .@i < getarraysize( .debuffs ); ++.@i ) { // sc_end .debuffs[ .@i ]; //} // Repair equipment while( getbrokenid(1) ) { repairall; } if (.@Buffs) { sc_start SC_INC_AGI,240000,10; sc_start SC_BLESSING,240000,10; sc_end SC_STONE; sc_end SC_SLOWDOWN; sc_end SC_FREEZE; sc_end SC_SLEEP; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_CONFUSION; sc_end SC_BLIND; sc_end SC_BLOODING; sc_end SC_DEC_AGI; sc_end SC_POISON; sc_end SC_ILLUSION; sc_end SC_NOEQUIPWEAPON; sc_end SC_NOEQUIPARMOR; sc_end SC_NOEQUIPHELM; sc_end SC_NOEQUIPSHIELD; sc_end SC_PROPERTYUNDEAD; sc_end SC_ORCISH; sc_end SC_BERSERK; sc_end SC_SKE; sc_end SC_SWOO; sc_end SC_SKA; specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10; specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10; } if (.@Delay) @HD = gettimetick(2)+.@Delay; end; } // Duplicates //============================================================ alberta,186,143,6 duplicate(Healer) Healer#alb 1_F_PRIEST aldebaran,135,118,6 duplicate(Healer) Healer#alde 1_F_PRIEST amatsu,200,79,4 duplicate(Healer) Healer#ama 1_F_PRIEST ayothaya,207,169,6 duplicate(Healer) Healer#ayo 1_F_PRIEST comodo,184,158,6 duplicate(Healer) Healer#com 1_F_PRIEST einbech,57,36,6 duplicate(Healer) Healer#einbe 1_F_PRIEST einbroch,57,202,6 duplicate(Healer) Healer#einbr 1_F_PRIEST geffen,115,72,6 duplicate(Healer) Healer#gef 1_F_PRIEST gonryun,156,122,6 duplicate(Healer) Healer#gon 1_F_PRIEST hugel,89,150,6 duplicate(Healer) Healer#hug 1_F_PRIEST izlude,125,118,5 duplicate(Healer) Healer#izl 1_F_PRIEST jawaii,250,139,4 duplicate(Healer) Healer#jaw 1_F_PRIEST lighthalzen,152,100,6 duplicate(Healer) Healer#lhz 1_F_PRIEST louyang,212,43,5 duplicate(Healer) Healer#lou 1_F_PRIEST manuk,272,144,6 duplicate(Healer) Healer#man 1_F_PRIEST mid_camp,203,289,6 duplicate(Healer) Healer#mid 1_F_PRIEST moc_ruins,72,164,4 duplicate(Healer) Healer#moc 1_F_PRIEST morocc,153,97,6 duplicate(Healer) Healer#mor 1_F_PRIEST moscovia,220,191,4 duplicate(Healer) Healer#mos 1_F_PRIEST niflheim,212,182,5 duplicate(Healer) Healer#nif 1_F_PRIEST payon,179,106,4 duplicate(Healer) Healer#pay 1_F_PRIEST payon,163,229,4 duplicate(Healer) Healer#pay2 1_F_PRIEST prontera,150,185,5 duplicate(Healer) Healer#prt 1_F_PRIEST rachel,125,116,6 duplicate(Healer) Healer#rac 1_F_PRIEST splendide,201,153,4 duplicate(Healer) Healer#spl 1_F_PRIEST thor_camp,249,74,4 duplicate(Healer) Healer#thor 1_F_PRIEST umbala,105,148,3 duplicate(Healer) Healer#umb 1_F_PRIEST veins,217,121,4 duplicate(Healer) Healer#ve 1_F_PRIEST xmas,143,136,4 duplicate(Healer) Healer#xmas 1_F_PRIEST yuno,164,45,4 duplicate(Healer) Healer#yuno 1_F_PRIEST // Duplicates (Renewal) //============================================================ brasilis,194,221,6 duplicate(Healer) Healer#bra 1_F_PRIEST dewata,195,187,4 duplicate(Healer) Healer#dew 1_F_PRIEST dicastes01,201,194,4 duplicate(Healer) Healer#dic 1_F_PRIEST ecl_in01,45,60,4 duplicate(Healer) Healer#ecl 1_F_PRIEST malangdo,132,114,6 duplicate(Healer) Healer#mal 1_F_PRIEST malaya,205,205,6 duplicate(Healer) Healer#ma 1_F_PRIEST mora,55,152,4 duplicate(Healer) Healer#mora 1_F_PRIEST
-
Feel free to message me on discord superpatskie#0110. I don't typically reply here as i always come and go after ~15minutes
-
How to send a "close()" after "disablenpc()"
Patskie replied to bWolfie's question in Source Requests
*close2() This command will create a 'close' button in the message window for the invoking character. WARNING: If no window is currently on screen, the script execution will halt indefinitely! See 'close'. There is one important difference, though - even though the message box will have closed, the script execution will not stop, and commands after 'close2' will still run, meaning an 'end' has to be used to stop the script, unless you make it stop in some other manner. mes("[Woman]"); mes("I will warp you now."); close2(); warp("place", 50, 50); end; Don't expect things to run smoothly if you don't make your scripts 'end'. close2 disablenpc end; -
I just based the script on your request. So I assume that you have disabled the official thanatos quest?
-
Your calling getinventorylist multiple times (while && for) and i'm not sure why Here try //===== Hercules Script ====================================== //= Healer //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.2 //===== Description: ========================================= //= Basic healer script. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.1 Aligned coordinates with @go. //= 1.2 Fix variables and character stuck at healing //============================================================ function script H_VIPBuff { query_sql( "SELECT CAST( `vip` AS DATE ),DATEDIFF( IFNULL(`vip`,NOW()),NOW() ), TIMESTAMPDIFF(SECOND, NOW(), `vip`) FROM `login` WHERE `account_id` = "+getcharid(3)+" LIMIT 1", .@vip_date$, .@day, .@vip_second); return .@day > 0 || .@vip_second > 0 ? true : false; } - script Healer FAKE_NPC,{ .@price = 0; // Zeny required for heal .@Buffs = 1; // Also buff players? (1: yes / 0: no) .@Delay = 2; // Heal delay, in seconds if (@HD > gettimetick(2)) end; if (.@price) { message strcharinfo(PC_NAME),"Healing costs "+.@price+" Zeny."; if (Zeny < .@price) end; if(select("^0055FFHeal^000000", "^777777Cancel^000000") == 2) close; Zeny -= .@price; } specialeffect(EF_HEAL2, AREA, playerattached()); percentheal 100,100; if (callfunc ("H_VIPBuff")) { sc_end SC_STONE; sc_end SC_FREEZE; sc_end SC_STUN; sc_end SC_SLEEP; sc_end SC_POISON; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_CONFUSION; sc_end SC_BLIND; sc_end SC_BLOODING; sc_end SC_DPOISON; sc_end SC_FEAR; sc_end SC_COLD; sc_end SC_BURNING; sc_end SC_DEEP_SLEEP; sc_end SC_DEC_AGI; sc_end SC_BROKENARMOR; sc_end SC_BROKENWEAPON; sc_end SC_NOEQUIPWEAPON; sc_end SC_NOEQUIPSHIELD; sc_end SC_NOEQUIPARMOR; sc_end SC_NOEQUIPHELM; sc_end SC__STRIPACCESSARY; sc_end SC_PROPERTYUNDEAD; sc_end SC_ORCISH; sc_end SC_BERSERK; sc_end SC_SKE; sc_end SC_SWOO; sc_end SC_SKA; sc_end SC_SLOWDOWN; sc_end SC_FROSTMISTY; sc_end SC_ILLUSION; sc_end SC_BITESCAR; //sc_start SC_CASH_PLUSEXP,.exp_bonus_duration,.bonus_vip_exp_rate; //sc_start SC_CASH_RECEIVEITEM,.bonus_duration,.bonus_vip_drop_rate; specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,10; specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,10; specialeffect(EF_KYRIE, AREA, playerattached()); sc_start SC_KYRIE, 120000, 3; specialeffect( EF_IMPOSITIO, AREA, playerattached()); sc_start SC_IMPOSITIO, 60000, 3; specialeffect(EF_GLORIA, AREA, playerattached()); sc_start SC_GLORIA, 30000, 3; if( getbrokenid(1) ) repairall; getinventorylist; for (.@i = 0; .@i < @inventorylist_count; .@i++) if ( @inventorylist_identify[.@i] == 1 ) continue; else if ( getskilllv(MC_IDENTIFY) == 1 && Sp >= 10 ) heal 0,0; // lol... this is supposed to reduce their SP by 10, whatever else if ( countitem(Spectacles) ) delitem Spectacles,1; else if ( getskilllv(RG_COMPULSION) && Zeny >= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5 ) Zeny -= ( 100 - ( 5 + 4 * getskilllv(RG_COMPULSION) ) )* 2/5; else if ( getskilllv(MC_DISCOUNT) && Zeny >= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5 ) Zeny -= ( 100 - ( 5 + 2 * getskilllv(MC_DISCOUNT) ) )* 2/5; else if ( Zeny >= 40 ) Zeny -= 40; else break; delitem2 @inventorylist_id[.@i], 1, 0, @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i]; getitem2 @inventorylist_id[.@i], 1, 1, @inventorylist_refine[.@i], 0, @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i]; .@icount++; } if ( .@icount ) message strcharinfo(0), "Identified "+ .@icount +" Items."; } else { if (.@Buffs) { specialeffect(EF_INCAGILITY, AREA, playerattached()); sc_start SC_INC_AGI,240000,5; specialeffect(EF_BLESSING, AREA, playerattached()); sc_start SC_BLESSING,240000,5; } if (.@Delay) @HD = gettimetick(2)+.@Delay; end; } }
-
Based on the error the source is coming from npc @ prontera 163 185 but you are showing a fake npc here. Are you calling that posted script from multiple npc's?
-
- script asdfh FAKE_NPC,{ OnCmd: if (!.@atcmd_numparameters || .@atcmd_numparameters != 2) { message strcharinfo(0), "Usage: @itemshower <item_id> <item_quantity>"; end; } .@item = atoi(.@atcmd_parameters$[0]); .@q = atoi(.@atcmd_parameters$[1]); if (!.@q || getitemname(.@item) == "null") { message strcharinfo(0), "Invalid item/amount"; end; } .@i = 0; while (.@i < .@q) { do { .@x = rand(1000, 1000); .@y = rand(1000, 1000); } while (!checkcell(.@map$, .@x, .@y, cell_chkpass)); makeitem .@item, 1, .@map$, .@x, .@y; .@i++; } end; OnInit: bindatcmd "itemshower", strnpcinfo(3) + "::OnCmd", 99, 99, true; end; }
-
/* Run below script to create table * CREATE TABLE IF NOT EXISTS `freebies_ip` AS * SELECT `LAST_IP` `IP` FROM `LOGIN` LIMIT 0; */ prontera,150,150,6 script Test 4W_SAILOR,{ if (!#FREEBIES && !query_sql("SELECT `IP` FROM `FREEBIES_IP` WHERE `IP` = '" + getcharip() + "'", .@ip$)) { .@i = 0; while (.@i < .size) { getitem .freebies[.@i], .freebies[.@i+1]; .@i += 2; } #FREEBIES = 1; query_sql("INSERT INTO `FREEBIES_IP` VALUES ('" + getcharip() + "')"); end; } mes "Already claimed freebies"; close; OnInit: // <item id>,<amount> setarray .freebies[0], Speed_Up_Potion_Box10, 5, Yggdrasilberry_Box_, 10; .size = getarraysize(.freebies); end; } Run the sql script first on the comment header
-
The request says "around the gm".
-
Change for(set .@i,1; .@i<9; set .@i,.@i+1) set .@menu$, .@menu$+"Arena "+.@i+" ["+getmapusers("pvp_n_"+.@i+"-"+getarg(0))+"/20]:"; To for(set .@i,1; .@i<9; set .@i,.@i+1) { if (.@i == 4) continue; set .@menu$, .@menu$ + "Arena " + .@i + " [" + getmapusers("pvp_n_" + .@i + "-" + getarg(0)) + "/20]:"; }
-
HOURLY ITEM REWARD SCRIPT for HERCULES
Patskie replied to fireicesurfer's question in Script Requests
Try : - script asdfgh FAKE_NPC,{ OnPCLoginEvent: .players[getarraysize(.players)] = getcharid(CHAR_ID_ACCOUNT); end; OnPCLogoutEvent: .@i = callfunc("array_find", .players, getcharid(CHAR_ID_ACCOUNT)); if (!(.@i < 0)) deletearray .players[.@i], 1; end; OnMinute15: if (!.random_receiver) { .@i = 0; .@s = getarraysize(.players); while (.@i < .@s) { getitem Jellopy, 1, .players[.@i]; .@i++; } } else getitem Jellopy, 1, .players[rand(getarraysize(.players))]; end; OnInit: .random_receiver = 0; // 0 - all online players | 1 = random online player end; } PS : I am using below release so please plug that as well to your server to avoid any issues -
Item giver for a specific range of account IDs
Patskie replied to Jiji's question in Script Requests
getitem Apple, 20, rand(2000009, 2000030); -
mes "You currently have TIMEPOINT " + #TIMEPOINT; mes "You currently have VOTEPOINT " + #VOTEPOINT; mes "You currently have SHAREPOINT " + #SHAREPOINT; mes "You currently have PVPPOINT " + #PVPPOINT; mes "You currently have MISSONPOINT " + #MISSONPOINT; mes "You currently have EVENTPOINT " + #EVENTPOINT; mes "You currently have MVPPOINT " + #MVPPOINT; mes "You currently have CASHPOINT " + #CASHPOINT;
-
If you are using Hercules you should use below *questprogress(<ID>{, <type>}) If no additional argument supplied, return the state of the quest: 0 = Quest not started (not in quest log) 1 = Quest has been given 2 = Quest completed If <type> PLAYTIME is supplied: 0 = Quest not started (not in quest log) 1 = The time limit has not yet been reached 2 = The time limit has been reached If <type> HUNTING is supplied: 0 = Quest not started (not in quest log) 1 = Player hasn't killed all of the target monsters 2 = Player has killed all of the target monsters if rAthena, then use below *checkquest(<ID>{,PLAYTIME|HUNTING{,<char_id>}}) If no additional argument supplied, return the state of the quest: -1 = Quest not started (not in quest log) 0 = Quest has been given, but the state is "inactive" 1 = Quest has been given, and the state is "active" 2 = Quest completed If parameter "PLAYTIME" is supplied: -1 = Quest not started (not in quest log) 0 = the time limit has not yet been reached 1 = the time limit has not been reached but the quest is marked as complete 2 = the time limit has been reached If parameter "HUNTING" is supplied: -1 = Quest not started (not in quest log) 0 = you haven't killed all of the target monsters and the time limit has not been reached. 1 = you haven't killed all of the target monsters but the time limit has been reached. 2 = you've killed all of the target monsters Tried the script and no error was given to me
-
function Array manipulation functions
Patskie commented on meko's file in Quest, Shops, Functions & Algorithms
-
Can you try below script? prontera,150,150,0 script Thanatos Summoner#22 4W_SAILOR,{ mes .npc$; .@party_id = getcharid(1); .@i = strnpcinfo(2); if (getd(".qwerty" + .@i)) { mes "Someone is talking to me!"; emotion 23; close; } setd(".qwerty" + .@i, 1); if (.@party_id && getpartyleader(.@party_id, 2) != getcharid(0)) { mes "Only the party leader can talk to me"; } else { mes "Hi " + strcharinfo(0) + ", What can i do for you?"; next; if (select("I want to summon Thanatos:Cancel") == 1 ) { mes .npc$; mes "You need the following items to summon thanatos"; .@a = 0; while (.@a < .size) { mes "> " + .fragments[.@a+1] + "x " + getitemname(.fragments[.@a]); .@a += 2; } next; if (select("Yes, I have those items and I'm ready to fight:I will think twice") == 1) { .@a = 0; while (.@a < .size) { if (countitem(.fragments[.@a]) < .fragments[.@a+1]) { mes .npc$; mes "You lack " + getitemname(.fragments[.@a]); setd(".qwerty" + .@i, 0); close; } .@a += 2; } .@a = 0; while (.@a < .size) { delitem .fragments[.@a], .fragments[.@a+1]; .@a += 2; } if (getcharid(1)) { announce "Party " + getpartyname(.@party_id) + " has initiated Thanatos Summoner", 0; warpparty "thana_boss", 113, 165, .@party_id, true; } else { announce strcharinfo(0) + " has initiated Thanatos Summoner", 0; warp "thana_boss", 113, 165; } monster "thana_boss", 0, 0, "--ja--", 1708, 1, strnpcinfo(3) + "::OnKill"; hideonnpc strnpcinfo(3); } } } setd(".qwerty" + .@i, 0); close; // 50 minutes mark On50MinMark: announce "Thanatos Summoner will open in 10 minutes", 0; addtimer 300000, strnpcinfo(3) + "::On55MinMark"; end; // 55 minutes mark On55MinMark: announce "Thanatos Summoner will open in 5 minutes", 0; addtimer 240000, strnpcinfo(3) + "::On59MinMark"; end; // 59 minutes mark On59MinMark: announce "Thanatos Summoner will open in 1 minute", 0; addtimer 60000, strnpcinfo(3) + "::OnEnable"; end; // 60 minutes mark OnEnable: announce "Thanatos Summoner is open", 0; hideoffnpc strnpcinfo(3); end; OnKill: .@party_id = getcharid(1); if (!.@party_id) { announce strcharinfo(0) + " successfully killed Thanatos", 0; sleep2 .warp_interval * 60 * 1000; warp "prontera", 150, 150; } else { announce strcharinfo(0) + " of party " + getpartyname(.@party_id) + " successfully killed Thanatos", 0; sleep2 .warp_interval * 60 * 1000; warpparty "prontera", 150, 150, .@party_id, true; } announce "Thanatos summoner will open again after " + .npc_interval + " minutes", 0; addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark"; end; OnPCDieEvent: if (strcharinfo(3) == "thana_boss") warp "SavePoint", 0, 0; if (!getmapusers("thana_boss")) { announce "No one manage to kill Thanatos. Thanatos summoner will open again after " + .npc_interval + " minutes", 0; killmonsterall "thana_boss"; addtimer .npc_interval * 60 * 1000, strnpcinfo(3) + "::On50MinMark"; } end; OnInit: .npc$ = "[" + strnpcinfo(1) + "]"; setarray .fragments[0], 1000, 2, 1001, 4; // <item_id>, <amount> .size = getarraysize(.fragments); .npc_interval = 50; // 50 minutes .warp_interval = 3; // 3 minutes announce "Thanatos Summoner is open", 0; end; } thana_boss mapflag nowarp thana_boss mapflag noreturn thana_boss mapflag nowarpto
-
- script asdfh FAKE_NPC,{ OnCmd: if (!.@atcmd_numparameters || .@atcmd_numparameters != 2) { message strcharinfo(0), "Usage: @itemshower <item_id> <item_quantity>"; end; } .@item = atoi(.@atcmd_parameters$[0]); .@q = atoi(.@atcmd_parameters$[1]); if (!.@q || getitemname(.@item) == "null") { message strcharinfo(0), "Invalid item/amount"; end; } getmapxy .@map$, .@x, .@y, UNITTYPE_PC; .@i = 0; while (.@i < .@q) { do { .@a = rand(.@x, .@x+200); .@b = rand(.@y, .@y+200); } while (!checkcell(.@map$, .@a, .@b, cell_chkpass)); makeitem .@item, 1, .@map$, .@a, .@b; .@i++; } end; OnInit: bindatcmd "itemshower", strnpcinfo(3) + "::OnCmd", 99, 99, true; end; }
-
Change BaseLevel to JobLevel
-
Probably the item doesn't exist on your item database? *getitemname(<item id>) Given the database ID number of an item, this function will return the text stored in the 'japanese name' field (which, in Hercules, stores an English name the players would normally see on screen). Return "null" if no such item exist.
-
Trade headgear for another headgear but keep the refine rate?
Patskie replied to Helena's question in Script Support
Much better if you use getitem2 new_1-1,56,126,0 script Test 4W_SAILOR,{ if ( !countitem( 5172 ) ) close; getinventorylist; mes "Pick the refine rate of " + getitemname( 5172 ) + " that you want to trade..."; next; for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) { if ( @inventorylist_id[ .@i ] == 5172 ) .@refine$[ getarraysize( .@refine$ ) ] = @inventorylist_refine[ .@i ]; } .@s = select( implode( .@refine$, ":" ) ) - 1; mes "Are you sure you want to trade +" + .@refine$[ .@s ] + " " + getitemname( 5172 ) + " to +" + .@refine$[ .@s ] + " " + getitemname( 2249 ) + "?"; next; if ( select( "Yes:No" ) - 1 ) close; delitem2 5172,1,1,.@refine$[ .@s ],0,0,0,0,0; getitem2 2249,1,1,.@refine$[ .@s ],0,0,0,0,0; close; } -
What will happen if they don't finish it within 24 hours? I find the 24 hours time limit pointless since if i cannot get it within 24 hours i can just hit the npc the second time around and get my item
-
Is this done? I'm interested! Message me
-
- script ItemRestrict -1,{ OnPCLoadMapEvent: while ( strcharinfo( 3 ) == "mjo_dun02" || strcharinfo( 3 ) == "mjo_dun03" ) { if ( getequipid( EQI_HEAD_MID ) != 5005 ) { message strcharinfo( 0 ), "You will be out on this map after five seconds"; sleep2 5000; atcommand "@die"; sleep2 500; warp "SavePoint", 0, 0; end; } sleep2 1000; } end;}mjo_dun02 mapflag loadeventmjo_dun03 mapflag loadevent