Jump to content

Emistry

Forum Moderator
  • Posts

    10018
  • Joined

  • Days Won

    408

Everything posted by Emistry

  1. if(gettimetick(2) - #dailytimer < ( .Hour * 3600)) { change to if(#dailytimer > gettimetick(2)) {
  2. .@count = getunits(BL_PC, .@units, false, "payon"); for (.@i = 0; .@i < .@count; .@i++) addtimer(0,strnpcinfo(0)+"::OnHPBar", .@units[.@i]); change to addrid(5, "payon"); addtimer(1000, strnpcinfo(0)+"::OnHPBar");
  3. updated 1.2, fixed cooldown and added option for zeny cost per refine attempt.
  4. prontera,155,181,5 script sample 757,{ switch(select( "Dice Event - " + ($EVT_Dice ? "^FF0000Not Available":"^00FF00Active") + "^000000", "Poring Event - " + (!$EVT_Poring ? "^FF0000Not Available":"^00FF00Active") + "^000000", "LMS Event - " + ($EVT_LMS ? "^FF0000Not Available":"^00FF00Active") + "^000000" )) { case 1: mes "blablbala"; case 2: mes "blablbala"; case 3: mes "blablbala"; } close; }
  5. you can actually spawn it this way and use setuntidata to control the direction. monster "payon",159,215,"Fur Seal",1317,1,strnpcinfo(3)+"::OnKilled"; setunitdata $@mobid[0], UMOB_LOOKDIR, DIR_EAST; monster "payon",159,213,"Fur Seal",1317,1,strnpcinfo(3)+"::OnKilled"; setunitdata $@mobid[0], UMOB_LOOKDIR, DIR_EAST; monster "payon",152,215,"Fur Seal",1317,1,strnpcinfo(3)+"::OnKilled"; setunitdata $@mobid[0], UMOB_LOOKDIR, DIR_WEST; monster "payon",152,213,"Fur Seal",1317,1,strnpcinfo(3)+"::OnKilled"; setunitdata $@mobid[0], UMOB_LOOKDIR, DIR_WEST;
  6. your npc is trying to update the data of a unit that no longer exists or invalid. post your script if you're asking others to check your script issue.
  7. change all @daily @DailyReward to #daily #DailyReward
  8. conf/groups.conf all_skill: true find and remove this from your player group or check the inherited groups
  9. 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; },{},{}
  10. 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!"; .@index = select( .stat_menu$ ) - 1; input .@amount,0,( .max_stats - readparam( 13+.@index ) ); if ( .@amount > 0 ) { .@cost = ( .cost_per_stat * .@amount ); mes "Stats : "+.stat$[.@index]+" +"+F_InsertComma( .@amount ); mes "Price : "+F_InsertComma( .@cost )+"z"; mes "Do you wish to continue ?"; .@current_stat = readparam(bStr + .@index); if (.@current_stat >= .max_stats) { message strcharinfo(0), "You've reached the maximum "+.stat$[.@index]; } else if ((.@current_stat+ .@amount) >= .max_stats) { message strcharinfo(0), "You can't exceed the maximum stats of "+.max_stats; } else if ( Zeny >= .@cost ) { if ( select( "Buy "+F_InsertComma( .@amount )+" ^FF00CC"+.stat$[.@index]+"^000000" ) ) { Zeny -= .@cost; statusup2 (bStr + .@index),.@amount; message strcharinfo(0), "Gained "+F_InsertComma( .@amount )+" "+.stat$[.@index]; } } } close; OnInit: .max_stats = 300; .cost_per_stat = 400000; setarray .stat$, "STR", "AGI", "VIT", "INT", "DEX", "LUK"; .@stat_size = getarraysize( .stat$ ); while ( .@i < .@stat_size ) { .stat_menu$ = .stat_menu$ + "^FF00CC"+.stat$[.@i]+"^000000" + ":"; .@i++; } end; }
  11. you can use cash food instead. or copy the item bonus script.
  12. pc_setglobalreg(sd, add_str("ProducePoints"), pc_readglobalreg(sd, add_str("ProducePoints")) + 1);
  13. 1@tower,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 "1@tower",352,9,362,45,"Gato de Nove Caudas",1307,15,instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead"; areamonster "1@tower",352,9,362,45,"Flor do Luar",1150,1,instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead"; areamonster "1@tower",352,9,362,45,"Nove Caudas",1180,15,instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead"; end; OnTouch_: warp "1@tower",395,12; end; OnMyMobDead: set .@mob_dead_num,mobcount("1@tower",instance_npcname("24FGate102tower", instance_id())+"::OnMyMobDead"); if (.@mob_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 "1@tower",352,9,362,45,"Baú do Tesouro",1356,1,instance_npcname("24FGate102tower", instance_id())+"::Onboxdead1"; areamonster "1@tower",352,9,362,45,"Baú do Tesouro",1356,1,instance_npcname("24FGate102tower", instance_id())+"::Onboxdead1"; areamonster "1@tower",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: " + .@mob_dead_num,bc_map,"0x00ff99"; end; Onboxdead1: Announce "[Torre Infinita. And.25] " + strcharinfo(0) +" abriu um dos Baús do Tesouro.",8; end; }
  14. 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.
  15. if (!onetimeitem) { onetimeitem = 1; } remove the prefix '#' that indicated the variable as account variable.
  16. - script Sample -1,{ OnNPCKillEvent: if (strcharinfo(3) == "prt_fild01") { if (rand(100) < 1) { // 1% get item. getitem 512, 1; } } end; }
  17. try configure the db/re/skill_tree.txt
  18. // 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,{ .@aid = getcharid(3); .@cid = getcharid(0); .@ip$ = getcharip(); .@unique_id$ = get_unique_id(); query_logsql("SELECT `id`,`time` FROM `bring_me_event` WHERE `aid` = "+.@aid+" OR `last_ip` = '"+escape_sql(.@ip$)+"' OR `last_unique_id` = '"+escape_sql(.@unique_id$)+"' LIMIT 1", .@id, .@time$); query_logsql("SELECT COUNT(`id`) FROM `bring_me_event`", .@size); if (.@size >= .max_redeem) { mes "you missed the reward, only "+.max_redeem+" players got the reward."; } else if (.@id) { mes "You've already claimed the rewards on "+.@time$+"."; } 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 ("+.@aid+","+.@cid+",'"+escape_sql(.@ip$)+"','"+escape_sql(.@unique_id$)+"', NOW())"); getitem 501,1; getitem 502,1; getitem 503,1; mes "you are the "+(.@size+1)+"/"+.max_redeem+" players who got the reward"; } } } close; OnInit: .item_id = 512; .amount = 300; .max_redeem = 200; end; } you can try this.
  19. remove it from db/re/item_stack.txt
  20. find all the variables and change it to account variables., with the prefix '#' infront of it.
  21. // https://rathena.org/board/topic/121239-prize-for-the-first-50/ /* CREATE TABLE IF NOT EXISTS `reward_for_first_50` ( `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,{ .@aid = getcharid(3); .@cid = getcharid(0); .@ip$ = getcharip(); .@unique_id$ = get_unique_id(); query_logsql("SELECT `id`,`time` FROM `reward_for_first_50` WHERE `aid` = "+.@aid+" OR `last_ip` = '"+escape_sql(.@ip$)+"' OR `last_unique_id` = '"+escape_sql(.@unique_id$)+"' LIMIT 1", .@id, .@time$); query_logsql("SELECT COUNT(`id`) FROM `reward_for_first_50`", .@size); if (.@size >= .max_redeem) { mes "you missed the reward, only "+.max_redeem+" players got the reward."; } else if (.@id) { mes "You've already claimed the rewards on "+.@time$+"."; } else { query_logsql("INSERT INTO `reward_for_first_50` (`aid`,`cid`,`last_ip`,`last_unique_id`,`time`) VALUES ("+.@aid+","+.@cid+",'"+escape_sql(.@ip$)+"','"+escape_sql(.@unique_id$)+"', NOW())"); getitem 501,1; getitem 502,1; getitem 503,1; mes "you are the "+(.@size+1)+"/"+.max_redeem+" players who got the reward"; } close; OnInit: .max_redeem = 50; end; } you can try this, less variables used or to keep track or conflicts with others. and should be compatible to all new/old emulators. - old emulator may have issue with the limitation of 128 array size, not sure which years it was lifted already.
  22. - script Sample FAKE_NPC,{ OnInit: bindatcmd("monster", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: .@mob_id = F_Rand(1001, 1002, 1003); // mob id. .@amount = atoi(.@atcmd_parameters$[0]); if (.@amount <= 0) .@amount = 1; getmapxy(.@map$, .@x, .@y, BL_PC); monster(.@map$, .@x + rand(-2,2), .@y + rand(-2,2), "--ja--", .@mob_id, .@amount); end; }
×
×
  • Create New...