Jump to content

Patskie

Forum Moderator
  • Content Count

    1,680
  • Avg. Content Per Day

    1
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Patskie

  1. Because you are caching the random indexed value in a variable and used them in all getitembound2 command. Remove set .Rand1, rand( getarraysize(.Ref) ); set .Rand2, rand( getarraysize(.Orb) ); And change getitembound2 .Armors[.RandA], 1, 1, .Ref[.Rand1], 0, 0, 0, 0, .Orb[.Rand2], 1; getitembound2 .Shields[.RandB], 1, 1, .Ref[.Rand1], 0, 0, 0, 0, .Orb[.Rand2], 1; getitembound2 .Garments[.RandC], 1, 1, .Ref[.Rand1], 0, 0, 0, 0, .Orb[.Rand2], 1; getitembound2 .Shoes[.RandD], 1, 1, .Ref[.Rand1], 0, 0, 0, 0, .Orb[.Rand2], 1; to getitembound2 .Armors[.RandA], 1, 1, .Ref[rand( getarraysize(.Ref) )], 0, 0, 0, 0, .Orb[rand( getarraysize(.Orb) )], 1; getitembound2 .Shields[.RandB], 1, 1, .Ref[rand( getarraysize(.Ref) )], 0, 0, 0, 0, .Orb[rand( getarraysize(.Orb) )], 1; getitembound2 .Garments[.RandC], 1, 1, .Ref[rand( getarraysize(.Ref) )], 0, 0, 0, 0, .Orb[rand( getarraysize(.Orb) )], 1; getitembound2 .Shoes[.RandD], 1, 1, .Ref[rand( getarraysize(.Ref) )], 0, 0, 0, 0, .Orb[rand( getarraysize(.Orb) )], 1;
  2. *monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}; monster "prontera",150,150,"Big MvP",1832,1,strnpcinfo(3)+"::OnKill",Size_Large;
  3. Whenever you delete the item of a player from SQL, the character must be offline else it will not reflect properly.
  4. Well I have tried that script and didn't face any issue with regards to the WAV sounds. You can post your script and let others help you out.
  5. If you wouldn't try, you will never know
  6. Marami ng changes after battlegrounds ni Easycore. I doubt if someone can give the upgrade for free. Alternatively pwede mo irevert yung rAthena version mo to a previous one and then apply the Easycore diff, again and again do it at your own risk. https://github.com/rathena/rathena/tree/de9f667d2f6e3272e6eca27fd2074142f379531d
  7. You have to add up something like this OnPCKillEvent: [email protected] = getcharid(3); if (killedrid == [email protected]) end; attachrid killedrid; [email protected] = Class; attachrid [email protected]; [email protected] = inarray(class_arr, [email protected]); if ([email protected] == -1) { [email protected] = getarraysize(class_arr); class_arr[[email protected]] = [email protected]; count_arr[[email protected]] = 1; } else cleararray count_arr[[email protected]], count_arr[[email protected]] + 1, 1; end; and then you can create npc to fetch all the details like below [email protected] = getarraysize(class_arr); if ([email protected]) mes "No data"; else { mes "Your kills per class"; for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) mes "> Job:" + jobname(class_arr[[email protected]]) + " | Kill Count:" + count_arr[[email protected]]; } close;
  8. query_sql ("INSERT INTO `redeembetalog` (`code`, `item_amount`,`name`, `time`) VALUES ('"+escape_sql(@voucher_code$)+"', '"[email protected]+"', '"+strcharinfo(0)+"', NOW())"); Store your data like above. Then whenever you pull the data, format them first before showing to the npc.
  9. "$" - A global permanent variable. They are stored by map-server in database table `mapreg`.
  10. Sa server main grf mo makikita yan msgstringtable.txt
  11. Warps is nasa npc folder yan, you can use below command to reload the warps @reloadnpcfile <path> Unloads and loads an NPC. Same as @unloadnpcfile and @loadnpc but ran as one command. Example: @reloadnpcfile npc/custom/jobmaster.txt
  12. We're not so genius to guess how your other script is doing. Maybe you could post both scripts which you think conflicts each other so other people could help you solve your issues.
  13. Not everyone does have that Easycore battleground mod. So you have to dig in more by yourself. Some insights like below You could add a state in pc.hpp bool cashshop_open; bool sale_open; + bool brothers; unsigned int block_action : 10; and access them in an if condition like if (sd->state.brothers) { // bypass the duplicate Of course you need to set the brothers (true/false) somewhere based on some criteria. Up to you where and how
  14. You have to used another way to store your bet amount. It's up to you to find out. I gave most of the mechanics already, besides you should detailed out your topic to prevent "1 question, last question" replies.
  15. - script MVP_vs_MVP FAKE_NPC,{ OnMinute00: if (gettime(DT_HOUR) % 2 || .start) end; goto OnStart; end; OnStart: mapwarp "[email protected]", "prontera", 150, 150; killmonster "[email protected]", "All"; .start = 1; announce .npc$ + " We are going to have a MVP vs MVP Event.", bc_all; sleep 7000; announce .npc$ + " For those who want to join, you can participate by using @mvpjoin", bc_all; sleep 7000; announce .npc$ + " We will start the event after 1 minute", bc_all; sleep 60000; announce .npc$ + " The entry to the event is now closed", bc_all; .start = 2; sleep 7000; if (getmapusers("[email protected]") < 1) { announce .npc$ + " Not enough participants to continue the event", 0; .start = 0; end; } mapannounce "[email protected]", .npc$ + " The rules for this event is simple", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " Two MVP's will spawn at the center of the map and will attack each other", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " Before these MVP's spawn, I will give you 1 minute to make a bet", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " The bet cost for this event is " + F_InsertComma(.bet_cost) + "z and when your chosen MVP wins you'll get as much as " + F_InsertComma(.bet_rewd) + "z !!!", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " All good?? Let's start betting !!!", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " To make a bet please use @mvpbet command, I will give 1 minute for you guys to make a bet", bc_map; .start = 3; sleep 55000; mapannounce "[email protected]", .npc$ + " Betting will close in 5...", bc_map; sleep 1000; mapannounce "[email protected]", .npc$ + " 4...", bc_map; sleep 1000; mapannounce "[email protected]", .npc$ + " 3...", bc_map; sleep 1000; mapannounce "[email protected]", .npc$ + " 2...", bc_map; sleep 1000; mapannounce "[email protected]", .npc$ + " 1...", bc_map; sleep 1000; .start = 4; mapannounce "[email protected]", .npc$ + " Betting is now closed !!!", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " Let's get ready to RUMBLE !!!", bc_map; [email protected] = .MVP[rand(.size)]; monster "[email protected]", 68, 68, "MVP A", [email protected], 1, strnpcinfo(1) + "::OnDie1", Size_Small, AI_NONE; .ma = [email protected]; monster "[email protected]", 71, 68, "MVP B", [email protected], 1, strnpcinfo(1) + "::OnDie2", Size_Small, AI_ATTACK; .mb = [email protected]; unitattack .ma, .mb; unitattack .mb, .ma; end; OnDie1: unittalk .mb, "[MVP B] Mwahaha!~ Such a weak opponent!"; sleep 7000; killmonster "[email protected]", "All"; .start = 0; addrid(5, 0, "[email protected]"); if (2 == @mvp_bet) { message strcharinfo(0),"Congratulations! You won the event, Good choice!"; Zeny += .bet_rewd; } @mvp_bet = 0; setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, false; warp "SavePoint", 0, 0; end; OnDie2: unittalk .ma, "[MVP A] Mwahaha!~ Such a weak opponent!"; sleep 7000; killmonster "[email protected]", "All"; .start = 0; addrid(5, 0, "[email protected]"); if (1 == @mvp_bet) { message strcharinfo(0),"Congratulations! You won the event, Good choice!"; Zeny += .bet_rewd; } @mvp_bet = 0; setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, false; warp "SavePoint", 0, 0; end; OnEventBet: mes .npc$; if (!.start) mes "The event is not active."; else if (.start != 3) mes "The event cannot accept bets at the moment."; else if (Zeny < .bet_cost) mes "You don't have enough zeny to make a bet."; else if (@mvp_bet) mes "You already placed your bet."; else if (strcharinfo(3) != "[email protected]") mes "Hmm~"; else { mes "Which mvp will you bet on this match???"; next; [email protected] = select("MVP A:MVP B"); mes .npc$; mes "Are you sure you want to bet " + F_InsertComma(.bet_cost) + " on " + ([email protected] == 1 ? "MVP A" : "MVP B") + "?"; next; if (select("Yes:No") & 2) end; if (.start != 3) { // in case they delay the select ??? setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, false; warp "SavePoint", 0, 0; end; } mes .npc$; mes "Good luck and have fun!"; Zeny -= .bet_cost; @mvp_bet = [email protected]; } end; OnEventJoin: if (!.start) message strcharinfo(0), "The event is not active."; else if (.start != 1) message strcharinfo(0), "The event is not yet allowing participants to enter."; else { setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, true; switch (rand(1,4)) { case 1: warp "[email protected]", 49, 50; break; case 2: warp "[email protected]", 49, 88; break; case 3: warp "[email protected]", 89, 88; break; case 4: warp "[email protected]", 89, 50; break; } } end; OnInit: bindatcmd "mvpjoin", strnpcinfo(1) + "::OnEventJoin"; bindatcmd "mvpbet", strnpcinfo(1) + "::OnEventBet"; bindatcmd "mvpstart", strnpcinfo(1) + "::OnStart", 99, 99; // List of MVP's setarray .MVP[0], 1112, 1115, 1147, 1150, 1157, 1159; .size = getarraysize(.MVP); .npc$ = "[MVP vs MVP Event]"; .bet_cost = 5000; // 5,000z to bet in the event .bet_rewd = 1000000; // 1,000,000z if bet wins end; } [email protected] mapflag monster_noteleport [email protected] mapflag noskill [email protected] mapflag noloot [email protected] mapflag noitemconsumption [email protected] mapflag nomemo [email protected] mapflag nosave SavePoint [email protected] mapflag nowarpto [email protected] mapflag nowarp [email protected] mapflag noteleport
  16. Does not from my local server. Are you using latest rAthena?
  17. Change recovery; to recovery 0, getcharid(0), 4;
  18. Try below script. I didn't test it too much - script MVP_vs_MVP FAKE_NPC,{ OnMinute00: if (gettime(DT_HOUR) % 2 || .start) end; goto OnStart; end; OnStart: mapwarp "[email protected]", "prontera", 150, 150; killmonster "[email protected]", "All"; .start = 1; announce .npc$ + " We are going to have a MVP vs MVP Event.", bc_all; sleep 7000; announce .npc$ + " For those who want to join, you can participate by using @mvpjoin", bc_all; sleep 7000; announce .npc$ + " We will start the event after 1 minute", bc_all; sleep 60000; announce .npc$ + " The entry to the event is now closed", bc_all; .start = 2; sleep 7000; if (getmapusers("[email protected]") < 1) { announce .npc$ + " Not enough participants to continue the event", 0; .start = 0; end; } mapannounce "[email protected]", .npc$ + " The rules for this event is simple", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " Two MVP's will spawn at the center of the map and will attack each other", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " Before these MVP's spawn, I will give you 1 minute to make a bet", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " The bet cost for this event is " + F_InsertComma(.bet_cost) + "z and when your chosen MVP wins you'll get as much as " + F_InsertComma(.bet_rewd) + "z !!!", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " All good?? Let's start betting !!!", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " To make a bet please use @mvpbet command, I will give 1 minute for you guys to make a bet", bc_map; .start = 3; sleep 55000; mapannounce "[email protected]", .npc$ + " Betting will close in 5...", bc_map; sleep 1000; mapannounce "[email protected]", .npc$ + " 4...", bc_map; sleep 1000; mapannounce "[email protected]", .npc$ + " 3...", bc_map; sleep 1000; mapannounce "[email protected]", .npc$ + " 2...", bc_map; sleep 1000; mapannounce "[email protected]", .npc$ + " 1...", bc_map; sleep 1000; .start = 4; mapannounce "[email protected]", .npc$ + " Betting is now closed !!!", bc_map; sleep 7000; mapannounce "[email protected]", .npc$ + " Let's get ready to RUMBLE !!!", bc_map; [email protected] = .MVP[rand(.size)]; monster "[email protected]", 68, 68, "MVP A", [email protected], 1, strnpcinfo(1) + "::OnDie1", Size_Small, AI_NONE; .ma = [email protected]; monster "[email protected]", 71, 68, "MVP B", [email protected], 1, strnpcinfo(1) + "::OnDie2", Size_Small, AI_ATTACK; .mb = [email protected]; end; OnDie1: unittalk .mb, "[MVP B] Mwahaha!~ Such a weak opponent!"; sleep 7000; killmonster "[email protected]", "All"; .start = 0; addrid(5, 0, "[email protected]"); if (2 == @mvp_bet) { message strcharinfo(0),"Congratulations! You won the event, Good choice!"; Zeny += .bet_rewd; } @mvp_bet = 0; setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, false; warp "SavePoint", 0, 0; end; OnDie2: unittalk .ma, "[MVP A] Mwahaha!~ Such a weak opponent!"; sleep 7000; killmonster "[email protected]", "All"; .start = 0; addrid(5, 0, "[email protected]"); if (1 == @mvp_bet) { message strcharinfo(0),"Congratulations! You won the event, Good choice!"; Zeny += .bet_rewd; } @mvp_bet = 0; setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, false; warp "SavePoint", 0, 0; end; OnEventBet: mes .npc$; if (!.start) mes "The event is not active."; else if (.start != 3) mes "The event cannot accept bets at the moment."; else if (Zeny < .bet_cost) mes "You don't have enough zeny to make a bet."; else if (@mvp_bet) mes "You already placed your bet."; else if (strcharinfo(3) != "[email protected]") mes "Hmm~"; else { mes "Which mvp will you bet on this match???"; next; [email protected] = select("MVP A:MVP B"); mes .npc$; mes "Are you sure you want to bet " + F_InsertComma(.bet_cost) + " on " + ([email protected] == 1 ? "MVP A" : "MVP B") + "?"; next; if (select("Yes:No") & 2) end; if (.start != 3) { // in case they delay the select ??? setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, false; warp "SavePoint", 0, 0; end; } mes .npc$; mes "Good luck and have fun!"; Zeny -= .bet_cost; @mvp_bet = [email protected]; } end; OnEventJoin: if (!.start) message strcharinfo(0), "The event is not active."; else if (.start != 1) message strcharinfo(0), "The event is not yet allowing participants to enter."; else { setpcblock PCBLOCK_ATTACK | PCBLOCK_IMMUNE, true; switch (rand(1,4)) { case 1: warp "[email protected]", 49, 50; break; case 2: warp "[email protected]", 49, 88; break; case 3: warp "[email protected]", 89, 88; break; case 4: warp "[email protected]", 89, 50; break; } } end; OnInit: bindatcmd "mvpjoin", strnpcinfo(1) + "::OnEventJoin"; bindatcmd "mvpbet", strnpcinfo(1) + "::OnEventBet"; bindatcmd "mvpstart", strnpcinfo(1) + "::OnStart", 99, 99; // List of MVP's setarray .MVP[0], 1112, 1115, 1147, 1150, 1157, 1159; .size = getarraysize(.MVP); .npc$ = "[MVP vs MVP Event]"; .bet_cost = 5000; // 5,000z to bet in the event .bet_rewd = 1000000; // 1,000,000z if bet wins end; } [email protected] mapflag monster_noteleport [email protected] mapflag noskill [email protected] mapflag noloot [email protected] mapflag noitemconsumption [email protected] mapflag nomemo [email protected] mapflag nosave SavePoint [email protected] mapflag nowarpto [email protected] mapflag nowarp [email protected] mapflag noteleport
  19. You can try to work with below command to get what you want
  20. After if ([email protected]_class != Class) { if (.Platinum) callfunc "F_GetPlatinumSkills"; if (.GetJobEquip) Get_Job_Equip(); } Add set instantjobchange,1;
  21. https://github.com/rathena/rathena/blob/master/conf/motd.txt data/msgstringtable.txt
  22. Something like this? prontera,150,150,6 script Sample 100,{ if (BaseLevel < 20) end; switch (select("Register", "View List", (getgmlevel() < 99 ? "" : "[^FF0000GM Menu^000000] Clear List"), "Exit")) { case 1: if (inarray($register$, strcharinfo(0)) != -1) mes "Already registered"; else { mes "Done registration"; $register$[getarraysize($register$)] = strcharinfo(0); } close; case 2: [email protected] = getarraysize($register$); if ([email protected]) mes "No list"; else { mes "Registration List"; for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) mes ([email protected]+1) + ". " + $register$[[email protected]]; } close; case 3: deletearray $register$; end; } }
  23. Maybe your function does not work well hence the issue
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.