-
Posts
9,746 -
Joined
-
Days Won
305
Community Answers
-
Emistry's post in IRO Divine Guard Hat was marked as the answer
db/re/item_db.txt
5900,Divine_Guard_Hat,Divine Guard Hat,4,0,,200,,10,,1,0x00004000,56,2,256,,100,1,1121,{ [email protected] = getrefine(); bonus2 bSubSize,Size_All,5; if([email protected]>=7) { [email protected] = getskilllv("AL_HEAL"); bonus3 bAutoSpellWhenHit,"AL_HEAL",([email protected] ? [email protected] : 5),10; } if([email protected]>=9) { bonus2 bSkillAtk,"LG_RAYOFGENESIS",20; } },{},{}
-
Emistry's post in Better performance for infinite loop was marked as the answer
- script effect_timer_npc HIDDEN_WARP_NPC,{ OnTimer1000: donpcevent "::OnEffect696"; // will trigger all npc that has this event label OnInit: initnpctimer; end; } - script effect_npc HIDDEN_WARP_NPC,{ OnEffect696: enablenpc(strnpcinfo(3)); misceffect 696; sleep rand(150,250); disablenpc(strnpcinfo(3)); end; } prontera,1,1,4 duplicate(effect_npc) #effect_npc_1 HIDDEN_WARP_NPC prontera,1,1,4 duplicate(effect_npc) #effect_npc_2 HIDDEN_WARP_NPC prontera,1,1,4 duplicate(effect_npc) #effect_npc_3 HIDDEN_WARP_NPC
-
Emistry's post in WoE Controller was marked as the answer
prontera,148,187,4 script WOE Information 652,{ doevent "WOE_CONTROL::OnMenu"; end; OnInit: OnAgitEnd: delwaitingroom; waitingroom "War of Emperium: Inactive",0; end; OnAgitStart: delwaitingroom; waitingroom "War of Emperium: Active", 0; while(agitcheck()) { specialeffect EF_BEGINSPELL6; sleep 425; } end; }
-
Emistry's post in Bug Negative Countdown was marked as the answer
if(gettimetick(2) - #dailytimer < ( .Hour * 3600)) { change to
if(#dailytimer > gettimetick(2)) {
-
Emistry's post in Skills showing up in MISC tab. Need help :( was marked as the answer
conf/groups.conf
all_skill: true find and remove this from your player group or check the inherited groups
-
Emistry's post in foods lose no effect on dying was marked as the answer
dig the item_db lol
//=================================================================== // Cash Shop Usable Items //=================================================================== 12202,Str_Dish10_,Steamed Tongue,0,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_FOOD_STR_CASH,1800000,10; percentheal 15,5; },{},{} 12203,Agi_Dish10_,Steamed Scorpion,0,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_FOOD_AGI_CASH,1800000,10; percentheal 15,5; },{},{} 12204,Int_Dish10_,Dragon Breath Cocktail,0,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_FOOD_INT_CASH,1800000,10; percentheal 15,5; },{},{} 12205,Dex_Dish10_,Hwergelmir's Tonic,0,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_FOOD_DEX_CASH,1800000,10; percentheal 15,5; },{},{} 12206,Luk_Dish10_,Cooked Nine Tail's Tails,0,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_FOOD_LUK_CASH,1800000,10; percentheal 15,5; },{},{} 12207,Vit_Dish10_,Stew Of Immortality,0,2,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start SC_FOOD_VIT_CASH,1800000,10; percentheal 15,5; },{},{}
-
Emistry's post in Stats Seller was marked as the answer
prontera,155,181,5 script Stats Mistress 757,{ mes "[ Stats Mistress ]"; mes "Hello! I sell ^FF00CC1 stats for 400,000z^000000 would you like to buy!"; [email protected] = select( .stat_menu$ ) - 1; input [email protected],0,( .max_stats - readparam( [email protected] ) ); if ( [email protected] > 0 ) { [email protected] = ( .cost_per_stat * [email protected] ); mes "Stats : "+.stat$[[email protected]]+" +"+F_InsertComma( [email protected] ); mes "Price : "+F_InsertComma( [email protected] )+"z"; mes "Do you wish to continue ?"; [email protected]_stat = readparam(bStr + [email protected]); if ([email protected]_stat >= .max_stats) { message strcharinfo(0), "You've reached the maximum "+.stat$[[email protected]]; } else if (([email protected]_stat+ [email protected]) >= .max_stats) { message strcharinfo(0), "You can't exceed the maximum stats of "+.max_stats; } else if ( Zeny >= [email protected] ) { if ( select( "Buy "+F_InsertComma( [email protected] )+" ^FF00CC"+.stat$[[email protected]]+"^000000" ) ) { Zeny -= [email protected]; statusup2 (bStr + [email protected]),[email protected]; message strcharinfo(0), "Gained "+F_InsertComma( [email protected] )+" "+.stat$[[email protected]]; } } } close; OnInit: .max_stats = 300; .cost_per_stat = 400000; setarray .stat$, "STR", "AGI", "VIT", "INT", "DEX", "LUK"; [email protected]_size = getarraysize( .stat$ ); while ( [email protected] < [email protected]_size ) { .stat_menu$ = .stat_menu$ + "^FF00CC"+.stat$[[email protected]]+"^000000" + ":"; [email protected]++; } end; }
-
Emistry's post in Increment Player's variable through Src was marked as the answer
pc_setglobalreg(sd, add_str("ProducePoints"), pc_readglobalreg(sd, add_str("ProducePoints")) + 1);
-
Emistry's post in EndlessTower awards every 25 floors was marked as the answer
[email protected],270,51,0 script 24FGate102tower 45,2,2,{ end; OnInstanceInit: disablenpc instance_npcname("24FGate102tower", instance_id()); end; OnEnable: enablenpc instance_npcname("24FGate102tower", instance_id()); areamonster "[email protected]",352,9,362,45,"Gato de Nove Caudas",1307,15,instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead"; areamonster "[email protected]",352,9,362,45,"Flor do Luar",1150,1,instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead"; areamonster "[email protected]",352,9,362,45,"Nove Caudas",1180,15,instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead"; end; OnTouch_: warp "[email protected]",395,12; end; OnMyMobDead: set [email protected]_dead_num,mobcount("[email protected]",instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead"); if ([email protected]_dead_num < 1) { instance_announce 0, "Todos os monstros no 25° andar foram derrotados.",bc_map,"0xffff00"; donpcevent instance_npcname("25FGate102tower", instance_id())+"::OnEnable"; areamonster "[email protected]",352,9,362,45,"Baú do Tesouro",1356,1,instance_npcname("24FGate102tower", instance_id())+"::Onboxdead1"; areamonster "[email protected]",352,9,362,45,"Baú do Tesouro",1356,1,instance_npcname("24FGate102tower", instance_id())+"::Onboxdead1"; areamonster "[email protected]",352,9,362,45,"Baú do Tesouro",1356,1,instance_npcname("24FGate102tower", instance_id())+"::Onboxdead1"; // party rewards. addrid(2, 0, getcharid(1)) { if (strcharinfo(3) == strnpcinfo(4)) { getitem 512, 1; getitem 512, 2; getitem 512, 3; } } } else instance_announce 0, "Monstros vivos no 25° andar: " + [email protected]_dead_num,bc_map,"0x00ff99"; end; Onboxdead1: Announce "[Torre Infinita. And.25] " + strcharinfo(0) +" abriu um dos Baús do Tesouro.",8; end; }
-
Emistry's post in fatal error player not attached was marked as the answer
you're probably killing monster with event label using GM commands, which you shouldn't
else the script should have check if any player are attached before continue execution.
-
Emistry's post in 1 time item bound only char id was marked as the answer
if (!onetimeitem) { onetimeitem = 1; } remove the prefix '#' that indicated the variable as account variable.
-
Emistry's post in Custom bring me event was marked as the answer
// https://rathena.org/board/topic/121262-custom-bring-me-event/ /* CREATE TABLE IF NOT EXISTS `bring_me_event` ( `id` int(11) unsigned NOT NULL auto_increment, `aid` int(11) unsigned NOT NULL default '0', `cid` int(11) unsigned NOT NULL default '0', `last_ip` varchar(100) NOT NULL default '', `last_unique_id` varchar(100) NOT NULL default '', `time` datetime NOT NULL, ) ENGINE=MyISAM; */ prontera,0,0,0 script Sample 444,{ [email protected] = getcharid(3); [email protected] = getcharid(0); [email protected]$ = getcharip(); [email protected]_id$ = get_unique_id(); query_logsql("SELECT `id`,`time` FROM `bring_me_event` WHERE `aid` = "[email protected]+" OR `last_ip` = '"+escape_sql([email protected]$)+"' OR `last_unique_id` = '"+escape_sql([email protected]_id$)+"' LIMIT 1", [email protected], [email protected]$); query_logsql("SELECT COUNT(`id`) FROM `bring_me_event`", [email protected]); if ([email protected] >= .max_redeem) { mes "you missed the reward, only "+.max_redeem+" players got the reward."; } else if ([email protected]) { mes "You've already claimed the rewards on "[email protected]$+"."; } else { mes "Bring me "+.amount+"x "+getitemname(.item_id); if (countitem(.item_id) >= .amount) { if (select("Okay","Cancel") == 1) { delitem .item_id, .amount; query_logsql("INSERT INTO `bring_me_event` (`aid`,`cid`,`last_ip`,`last_unique_id`,`time`) VALUES ("[email protected]+","[email protected]+",'"+escape_sql([email protected]$)+"','"+escape_sql([email protected]_id$)+"', NOW())"); getitem 501,1; getitem 502,1; getitem 503,1; mes "you are the "+([email protected]+1)+"/"+.max_redeem+" players who got the reward"; } } } close; OnInit: .item_id = 512; .amount = 300; .max_redeem = 200; end; } you can try this.
-
Emistry's post in @monster random at list mob was marked as the answer
- script Sample FAKE_NPC,{ OnInit: bindatcmd("monster", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: [email protected]_id = F_Rand(1001, 1002, 1003); // mob id. [email protected] = atoi([email protected]_parameters$[0]); if ([email protected] <= 0) [email protected] = 1; getmapxy([email protected]$, [email protected], [email protected], BL_PC); monster([email protected]$, [email protected] + rand(-2,2), [email protected] + rand(-2,2), "--ja--", [email protected]_id, [email protected]); end; }
-
Emistry's post in How to add quest delay? or NPC talk delay per character was marked as the answer
prontera,155,181,5 script Sample 4_F_KAFRA1,{ if (gettimetick(2) > #COOLDOWN_REWARD) { #COOLDOWN_REWARD += (gettimetick(2) + 60); // 60 seconds. getitem 512, 1; getitem 512, 2; getitem 512, 3; } mes "You obtained rewards, come back again after "+(#COOLDOWN_REWARD - gettimetick(2))+" seconds."; close; } if you're using the quest system then you can use this to check the duration.
checkquest(<quest_id>, PLAYTIME, 2)
-
Emistry's post in help bindatcmd was marked as the answer
- script Sample -1,{ OnInit: bindatcmd "sample",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: if(getgroupid() < 1) { callfunc "sample2"; } else { callfunc "sample1"; } end; } btw getgroupid aren't vip level.
-
Emistry's post in Waiting room getmapuser was marked as the answer
there are several ways to do it ... one of the most common way ..
OnInit: OnTimer1000: delwaitingroom; waitingroom "PvP Arena ["+getmapusers("pvproom")+"]",0; initnpctimer; end;
-
Emistry's post in Areamonster was marked as the answer
unknown syntax aren't part of script command errors.
check your script instead, ensure you follow the structure for NPC script.
if you are not sure, then post the full script and full error messages.
-
Emistry's post in Help npc menu selection refining was marked as the answer
for([email protected] = EQI_ACC_L; [email protected] <= EQI_HAND_R; [email protected]++) { if(getequipisequiped([email protected])) { [email protected]$ += F_getpositionname([email protected]) + " - " + "[" + getequipname([email protected]) + "]"; [email protected] = 1; } [email protected]$ += ":"; } you dont really need the array for equipment position, you could use the F_getpositionname(...)
-
Emistry's post in Anti Double Log Script was marked as the answer
you can try something like this.
- script sample -1,{ OnInit: .map$ = "geffen"; setmapflag .map$, mf_loadevent; end; OnPCLoadMapEvent: if (strcharinfo(3) == .map$) { [email protected] = query_sql("SELECT c.`account_id` FROM `char` c INNER JOIN `login` acc ON acc.`account_id` = c.`account_id` WHERE c.`account_id` <> "+getcharid(3)+" AND c.`online` = 1 AND acc.`last_ip` = '"+getcharip()+"'", [email protected]); [email protected] = getcharid(0); for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) if (attachrid([email protected])) { if (strcharinfo(3) == .map$) { [email protected]++; if ([email protected] >= 2) { warp "SavePoint", 0, 0, [email protected]; end; } } } } end; } you should just disable dual client feature when diff the client.
and implement client hash checking to avoid other using custom hexed client to bypass that.
-
Emistry's post in rent item atcommands was marked as the answer
- script atcmd_example -1,{ OnInit: bindatcmd("rentitem", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: [email protected] = atoi([email protected]_parameters$[0]); if (getitemname([email protected]) != "null") { if (getiteminfo([email protected], 2) != IT_CARD) { rentitem [email protected], (24 * 60 * 60); // 1 day } else { dispbottom [email protected]_command$+" - You cant rent "+getitemname([email protected]); } } else { dispbottom [email protected]_command$+" - invalid item #"[email protected]; } end; }
-
Emistry's post in MVP Invasion was marked as the answer
- script Sample -1,{ OnInit: setarray .Map$[0],"prontera","payon","izlude"; setarray .MVP[0],1751,1832,1252,1648; end; OnHour00: OnHour08: killmonster .Map$[ .RandMap ],"All"; if( .event_timer%8 ) end; .event_timer++; set .RandMap,rand( getarraysize( .Map$ ) ); set .RandMVP,rand( getarraysize( .MVP ) ); monster .Map$[ .RandMap ],0,0,"MVP Event",.MVP[ .RandMVP ],1,strnpcinfo(0)+"::OnKilled"; announce "MVP "+getmonsterinfo( .MVP[ .RandMVP ],0 )+" Telah Merusak Kota "+.Map$[ .RandMap ]+" . Seseorang Harus membantu!!",0; initnpctimer; end; OnKilled: announce "MVP telah Mati. Kota telah Aman.",0; OnTimer3600000: killmonster .Map$[ .RandMap ],"All"; stopnpctimer; end; }
-
Emistry's post in Rental NPC Shop was marked as the answer
npc/custom/quests/quest_shop.txt
change getitem into rentitem and equivalent parameter values.
-
Emistry's post in @whodrops limit was marked as the answer
you can try add this before the item search filter
if (atoi(message) >= 30000) { clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name. return -1; }