

Racaae
Members-
Posts
212 -
Joined
-
Last visited
-
Days Won
32
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Racaae
-
I'm not sure this is what you asked. You can copy the NPC to put in another map, there are 3 examples. The item data is in the .items array. //===== rAthena Script ======================================= //= Idea Economic Model //===== By: ================================================== //= monyet //============================================================ // NPC: Abas Eden Group (NPC Penjual Item Konsumsi) morocc,172,86,5 script Abas 56,{ mes "[Abas]"; mes "Berikut adalah harga pembelian kami saat ini:"; ShowSellItemList(strnpcinfo(0)); next; ChooseSellItem(strnpcinfo(0)); close; OnInit: //<Item ID>, <Minimum Price>, <Maximum Price>, setarray .items, 12041,200,2500, //Fried Grasshopper Legs 12051,150,2550, //Steamed Crab Nippers 12056,200,2500, //Frog Egg Squid Ink Soup 12066,200,2500, //Fried Monkey Tails 12042,200,2500, //Seasoned Sticky Webfoot 12052,200,2500, //Assorted Seafood 12057,200,2500, //Smooth Noodle 12043,200,2500, //Bomber Steak 12053,200,2500, //Clam Soup 12058,200,2500, //Tentacle Cheese Gratin 12068,200,2500, //Fried Sweet Potato 12054,200,2500, //Seasoned Jellyfish 12059,200,2500, //Lutie Cold Noodle 12069,200,2500, //Steamed Ancient Lips 12070,200,2500; //Fried Scorpion Tails bindatcmd "resetpricesmorocc",strnpcinfo(3) + "::OnReset",99,99; .size = getarraysize(.items); donpcevent strnpcinfo(0)+"::OnReset"; end; OnTimer3600000: OnReset: stopnpctimer(); .@npc = getnpcid(0); for ( .@i = 0; .@i < .size; .@i += 3 ) { setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]); setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]); } initnpctimer(); announce "Pedagang Grup Eden Morocc: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all; end; } // NPC: Abas Veins (NPC Penjual Item ratna) morocc,172,90,3 script Abas#veins 1_M_SIGNMCNT,{ mes "[Abas]"; mes "Saya akan membeli batu langka apa pun yang Anda temukan saat menambang."; if (getgroupid() >= 99) mes " ", "^808080@resetpricesveins^000000 untuk memaksa pengaturan ulang."; next; switch(select("Pembelian harga saat", "Penjual")) { case 1: mes "[Abas]"; mes "Berikut adalah harga pembelian kami saat ini:"; ShowSellItemList(strnpcinfo(0)); break; case 2: ChooseSellItem(strnpcinfo(0)); break; } close; OnInit: //<Item ID>, <Minimum Price>, <Maximum Price>, setarray .items, 718,3000,6000, //Garnet 719,3000,6000, //Amethyst 720,3000,6000, //Aquamarine 721,2500,4500, //Emerald 722,3000,6000, //Pearl 723,2500,4500, //Ruby 725,3000,6000, //Sardonyx 726,2500,4500, //Sapphire 727,3000,6000, //Opal 728,2500,4500, //Topaz 729,2500,4500, //Zircon 969,2000,3500, //Gold 714,10000,20000; //Emperium bindatcmd "resetpricesveins",strnpcinfo(3) + "::OnReset",99,99; .size = getarraysize(.items); donpcevent strnpcinfo(0)+"::OnReset"; end; OnMinute20: OnReset: stopnpctimer(); .@npc = getnpcid(0); for ( .@i = 0; .@i < .size; .@i += 3 ) { setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]); setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]); } initnpctimer(); announce "Pedagang Veins: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all; end; } // NPC: Abas Rachel (NPC Penjual Item) morocc,170,89,3 script Abas#rachel 935,{ mes "[Abas]"; mes "Kuil tersebut mencari artefak terkutuk untuk pemurnian nanti."; if (getgroupid() >= 99) mes " ", "^808080@resetpricesrachel^000000 untuk memaksa pengaturan ulang."; next; switch(select("Pembelian harga saat", "Penjual")) { case 1: mes "[Abas]"; mes "Berikut adalah harga pembelian kami saat ini:"; ShowSellItemList(strnpcinfo(0)); break; case 2: ChooseSellItem(strnpcinfo(0)); break; } close; OnInit: //<Item ID>, <Minimum Price>, <Maximum Price>, setarray .items, 1761,50,200, //Cursed Arrow 724,200,600, //Cursed Ruby 6004,8000,10000, //Cursed Baphomet Doll 12020,1000,2000, //Cursed Water 2728,50000,60000; //Cursed Hand bindatcmd "resetpricesrachel",strnpcinfo(3) + "::OnReset",99,99; .size = getarraysize(.items); donpcevent strnpcinfo(0)+"::OnReset"; end; OnMinute40: OnReset: stopnpctimer(); .@npc = getnpcid(0); for ( .@i = 0; .@i < .size; .@i += 3 ) { setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]); setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]); } initnpctimer(); announce "Pedagang Kuil Rachel: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all; end; } // NPC: Abas Hugel (NPC Penjual Item) morocc,176,90,3 script Abas#hugel 4_M_HUOLDARMY,{ mes "[Abas]"; mes "Halo! Saya membeli barang-barang lokal untuk mendukung pertanian di Hugel."; if (getgroupid() >= 99) mes " ", "^808080@resetpriceshugel^000000 untuk memaksa pengaturan ulang."; next; switch(select("Pembelian harga saat", "Penjual")) { case 1: mes "[Abas]"; mes "Berikut adalah harga pembelian kami saat ini:"; ShowSellItemList(strnpcinfo(0)); break; case 2: ChooseSellItem(strnpcinfo(0)); break; } close; OnInit: //<Item ID>, <Minimum Price>, <Maximum Price>, setarray .items, 519,50,100, //Milk 574,50,100, //Egg 518,100,200, //Honey 577,100,200, //Grain 1026,100,200, //Acorn 581,100,200, //Edible Mushroom 515,100,200, //Carrot 516,100,200, //Sweet Potato 535,100,200, //Pumpkin 517,150,300, //Meat 919,80,100; //Animal Skin bindatcmd "resetpriceshugel",strnpcinfo(3) + "::OnReset",99,99; .size = getarraysize(.items); donpcevent strnpcinfo(0)+"::OnReset"; end; OnMinute00: OnReset: stopnpctimer(); .@npc = getnpcid(0); for ( .@i = 0; .@i < .size; .@i += 3 ) { setd "$@" + .@npc + "last" + .items[.@i], getd("$@" + .@npc + "_" + .items[.@i]); setd "$@" + .@npc + "_" + .items[.@i], rand(.items[.@i+1], .items[.@i+2]); } initnpctimer(); announce "Pedagang Hugel: Harga telah diperbarui! Silakan cek barang yang ingin dijual.", bc_all; end; } // Function ShowSellItemList - Tampilkan daftar barang yang dijual function script ShowSellItemList { .@npc = getnpcid(0, getarg(0)); .@size = getvariableofnpc( .size, getarg(0)); copyarray .@items[0], getvariableofnpc( .items[0], getarg(0)), .@size; for ( .@i = 0; .@i < .@size; .@i += 3 ) { .@item_id = .@items[.@i]; .@old_price = getd("$@" + .@npc + "last" + .@items[.@i]); .@price = getd("$@" + .@npc + "_" + .@items[.@i]); if (.@price > .@old_price && .@old_price) setarray .@c$,"^008000","/\\"; else if (.@price < .@old_price) setarray .@c$,"^FF0000","\\/"; mes mesitemlink(.@item_id, false) + ": " + .@c$[0] + F_InsertComma(.@price) + " Z " + .@c$[1] + "^000000"; } return; } // Function ChooseSellItem - periksa inventaris untuk barang yang akan dijual function script ChooseSellItem { disable_items; .@npc = getnpcid(0, getarg(0)); explode(.@npcname$, getarg(0), "#"); .@size = getvariableofnpc( .size, getarg(0)); copyarray .@items[0], getvariableofnpc( .items[0], getarg(0)), .@size; for (.@i = 0; .@i < .@size; .@i+=3) { if (countitem(.@items[.@i]) > 0) { .@menu$ += "^0000FF" + getitemname(.@items[.@i]) + "^000000:"; .@menuindex[.@count++] = .@i; } } if (.@count == 0) { mes "[" + .@npcname$[0] + "]"; mes "Anda tidak memiliki salah satu item yang diterima."; mes "Kembali lagi ketika Anda memiliki sesuatu untuk dijual."; close; } mes "[" + .@npcname$[0] + "]"; mes "Apa yang ingin kamu jual?"; mes "Silakan pilih item yang ingin kamu jual."; .@selected = .@menuindex[select(.@menu$ + "Tidak Jadi") - 1]; clear; if (.@selected < .@count) { mes "[" + .@npcname$[0] + "]"; mes "Baik, mungkin lain kali."; close; } callfunc "SellItem", .@items[.@selected], getd("$@" + .@npc + "_" + .@items[.@selected]), getitemname(.@items[.@selected]); return; } // Function SellItem — penanganan jual item function script SellItem { .@item_id = getarg(0); .@price = getarg(1); .@item_name$ = getarg(2); if (countitem(.@item_id) < 1) { mes "Maaf, sepertinya kamu tidak memiliki "+.@item_name$+"!"; close; } mes "Berapa banyak "+.@item_name$+" yang ingin kamu jual?"; input .@amount; if (.@amount <= 0 || .@amount > countitem(.@item_id)) { mes "Mohon masukkan jumlah yang valid!"; close; } .@total_price = .@amount * .@price; mes "Kamu akan mendapatkan "+.@total_price+" Zeny untuk "+.@amount+" "+.@item_name$+"."; if (select("Jual:Batalkan") == 1) { delitem .@item_id, .@amount; set Zeny, Zeny + .@total_price; mes "Terima kasih telah menjual "+.@amount+" "+.@item_name$+" seharga "+.@total_price+" Zeny!"; } else { mes "Baik, mungkin lain kali."; } close; }
-
Hi. Find: OnTimer10800000: And replace: OnTimer9000000: //trigger on the minimum time (2.5 hours) sleep rand(1800000); //Waits randomly until the max time (3 hours) Find: monster "prontera",98,186,"Gluttonous Plant",1750,1,"AntHellInvasion::OnInvasionAntHellPlant"; And add below it: setunitdata($@mobid[0], UMOB_DMGIMMUNE, 1); //make Plant not killable
-
Mr.Secrets DressRoom - Custom Request
Racaae replied to Gabe D Stydian's question in Script Requests
Hello //===== rAthena Script ===========================================| //= Mr.Secrets DressRoom - Custom Request //= 1.5 Added 4th job sprites and item requirements [Racaae] //= https://rathena.org/board/topic/144504-mrsecrets-dressroom-custom-request morocc,167,95,4 script Dress Room#sc 2_M_DYEINGER,{ function RestrictClass; function HasjROCostume; function ChangeAppr; function RestrictClass { .@eaj = eaclass(); if(.@eaj&EAJ_BASEMASK == EAJ_NOVICE) return 0; if(.@eaj&EAJL_2 && roclass(.@eaj|EAJL_UPPER) != -1){ return 1; } return 0; } function HasjROCostume { switch(roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD)) { case Job_Guillotine_Cross: case Job_Genetic: case Job_Royal_Guard: case Job_Arch_Bishop: case Job_Mechanic: case Job_Ranger: case Job_Minstrel: case Job_Wanderer: case Job_Warlock: // Uncomment lines below to enable certain job when their respective jRO costume is released and you patched the sprite in your client. //case Job_Sorcerer: //case Job_Sura: //case Job_Rune_Knight: return 1; default: return 0; } } function ChangeAppr { mes .n$; if (Zeny < .cost_dressroom) { mes "You don't have enough Zeny."; .@missingzeny = true; } .@size = getarraysize(.cost_item); if (.@size > 1) { for ( .@i = 0; .@i < .@size; .@i += 2 ) { if (countitem(.cost_item[.@i]) < .cost_item[.@i+1]) { if (!.@missingitem) { mes "You didn't bring what I need. You're missing:"; .@missingitem = true; } mes .cost_item[.@i+1] + "x " + mesitemlink(.cost_item[.@i]); } } } if (.@missingzeny || .@missingitem) close; switch(getarg(1)){ case 0: // Normal Mode setlook LOOK_BODY2,0; changebase getarg(0); set baselook, getarg(0); break; case 1: // jRO Mode if(!HasjROCostume()) return; changebase roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD); setlook LOOK_CLOTHES_COLOR,0; setlook LOOK_BODY2,!(getlook(LOOK_BODY2)); //atcommand "@bodystyle " + !(getlook(LOOK_BODY2)); baselook = 0; break; } Zeny -= .cost_dressroom; .@size = getarraysize(.cost_item); if (.@size > 1) { for ( .@i = 0; .@i < .@size; .@i += 2 ) delitem .cost_item[.@i], .cost_item[.@i+1]; } mes "Here you are!"; close; } .@TYPE_CHANGEBASE = 0; .@TYPE_SETLOOK = 1; mes .n$; if (!RestrictClass()){ mes "Your class isn't allowed to use my services."; close; } mes "I can change your appearance to another class of your classline!"; if (HasjROCostume()){ mes "I also have a brand new costume for your class!"; } next; mes .n$; if (.cost_dressroom) mes "At a cost of ^FF0000" + F_InsertComma(.cost_dressroom) + "^000000z"; //displaying needed item list .@size = getarraysize(.cost_item); if (.@size > 1) { for ( .@i = 0; .@i < .@size; .@i += 2 ) mes (.@i+3>.@size?"And ":"") + .cost_item[.@i+1] + "x " + mesitemlink(.cost_item[.@i]); } mes "Which class do you want to change your appearance to?"; next; .@option[0] = roclass(eaclass()&EAJ_UPPERMASK); .@option[1] = roclass(eaclass()&EAJ_UPPERMASK|EAJL_UPPER); .@option[2] = roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD); if (.4th) { .@job = roclass(eaclass()&EAJ_THIRDMASK|EAJL_THIRD); .@option[4] = roclass(eaclass(.@job)|EAJL_FOURTH|EAJL_UPPER); } for(.@i = 0; .@i < (.4th?5:4); .@i++) { if (!.@option[.@i] && HasjROCostume() && !getlook(LOOK_BODY2) && .@option[.@i] != baselook) .@menu$ += "New jRO " + jobname(.@option[2]) + " costume"; else if (.@option[.@i] > 0 && .@option[.@i] != baselook) { if (roclass(eaclass()) == .@option[.@i]) .@menu$ += "Restore " + jobname(.@option[.@i]) + " costume"; else .@menu$ += jobname(.@option[.@i]); } .@menu$ += ":"; } if(select(.@menu$)-1 == 3) { //jRO costume ChangeAppr(0,.@TYPE_SETLOOK); } ChangeAppr(.@option[@menu-1],.@TYPE_CHANGEBASE); end; OnPCLoginEvent: if(baselook && .dress_perma){ changebase baselook; } end; OnInit: .n$ = "[Dress Room]"; // NPC Name .dress_perma = 1; //Changes are saved when player logout (1=Yes / 0=No) .4th = true; //Enable changing to 4th job sprite (True / False) .cost_dressroom = 10000; // Zeny Cost setarray .cost_item,6959,1,982,3,983,2; // Item cost - item ID,Amount,item ID,Amount... end; } -
Hi. Add this in \db\import\item_db.yml - Id: 512 Trade: NoDrop: true In this example, Apple (ID 512) cannot be dropped. Change the ID to your item's. PTBR:
-
Quests, Games: Sader's MiniEndlessTower 25floor
Racaae replied to sader1992's topic in Game, Event, Quest Script Releases
Add this to \db\import\instance_db.yml - Id: 200 Name: Mini Endless Tower TimeLimit: 14400 Enter: Map: 1@Mtower X: 50 Y: 355 -
sprite 20995 DEADSOUL.rar
-
Hi. Put the following function above the NPC: ////////////////////////////////////////////////////////////////////////////////// // Returns Random Option name and value // -- callfunc "F_RDMOPT_Name",<ROA_ID>{,<Value>{,<2nd value>}}; ////////////////////////////////////////////////////////////////////////////////// function script F_RDMOPT_Name { if (getargcount() > 2) .@s$ = getarg(1) + "~" + getarg(2); else if (getargcount() > 1) .@s$ = getarg(1); else .@s$ = "?"; if (#langtype = 8) { //POR switch(getarg(0)){ case 3: return "FOR +" + .@s$; case 6: return "INT +" + .@s$; case 7: return "DES +" + .@s$; case 8: return "SOR +" + .@s$; case 232: return "EXP ganha de Amorfos +" + .@s$ + "%"; case 233: return "EXP ganha de Morto-Vivos +" + .@s$ + "%"; case 234: return "EXP ganha de Brutos +" + .@s$ + "%"; case 235: return "EXP ganha de Plantas +" + .@s$ + "%"; case 236: return "EXP ganha de Insetos +" + .@s$ + "%"; case 237: return "EXP ganha de Peixes +" + .@s$ + "%"; case 238: return "EXP ganha de Demônios +" + .@s$ + "%"; case 239: return "EXP ganha de Humanoides +" + .@s$ + "%"; case 240: return "EXP ganha de Anjos +" + .@s$ + "%"; case 241: return "EXP ganha de Dragões +" + .@s$ + "%"; case 242: return "EXP ganha de todas raças +" + .@s$ + "%"; } } switch(getarg(0)){ case 1: return "MaxHP +" + .@s$; case 2: return "MaxSP +" + .@s$; case 3: return "STR +" + .@s$; case 4: return "AGI +" + .@s$; case 5: return "VIT +" + .@s$; case 6: return "INT +" + .@s$; case 7: return "DEX +" + .@s$; case 8: return "LUK +" + .@s$; case 9: return "MaxHP +" + .@s$ + "%"; case 10: return "MaxSP +" + .@s$ + "%"; case 11: return "HP regen +" + .@s$ + "%"; case 12: return "SP regen +" + .@s$ + "%"; case 13: return "ATK +" + .@s$ + "%"; case 14: return "MATK +" + .@s$ + "%"; case 15: return "ASPD +" + .@s$; case 16: return "Delay after attack -" + .@s$ + "%"; case 17: return "ATK +" + .@s$; case 18: return "HIT +" + .@s$; case 19: return "MATK +" + .@s$; case 20: return "DEF +" + .@s$; case 21: return "MDEF +" + .@s$; case 22: return "FLEE +" + .@s$; case 23: return "Perfect dodge +" + .@s$; case 24: return "CRIT +" + .@s$; case 25: return "Neutral elemental resistance +" + .@s$ + "%"; case 26: return "Water elemental resistance +" + .@s$ + "%"; case 27: return "Earth elemental resistance +" + .@s$ + "%"; case 28: return "Fire elemental resistance +" + .@s$ + "%"; case 29: return "Wind elemental resistance +" + .@s$ + "%"; case 30: return "Poison elemental resistance +" + .@s$ + "%"; case 31: return "Holy elemental resistance +" + .@s$ + "%"; case 32: return "Shadow elemental resistance +" + .@s$ + "%"; case 33: return "Ghost elemental resistance +" + .@s$ + "%"; case 34: return "Undead elemental resistance +" + .@s$ + "%"; case 35: return "All elemental (except Neutral) resistance +" + .@s$ + "%"; case 36: return "Neutral monster resistance +" + .@s$ + "%"; case 37: return "ATK +" + .@s$ + "% against Neutral monster"; case 38: return "Water monster resistance +" + .@s$ + "%"; case 39: return "ATK +" + .@s$ + "% against Water monster"; case 40: return "Earth monster resistance +" + .@s$ + "%"; case 41: return "ATK +" + .@s$ + "% against Earth monster"; case 42: return "Fire monster resistance +" + .@s$ + "%"; case 43: return "ATK +" + .@s$ + "% against Fire monster"; case 44: return "Wind monster resistance +" + .@s$ + "%"; case 45: return "ATK +" + .@s$ + "% against Wind monster"; case 46: return "Poison monster resistance +" + .@s$ + "%"; case 47: return "ATK +" + .@s$ + "% against Poison monster"; case 48: return "Holy monster resistance +" + .@s$ + "%"; case 49: return "ATK +" + .@s$ + "% against Holy monster"; case 50: return "Shadow monster resistance +" + .@s$ + "%"; case 51: return "ATK +" + .@s$ + "% against Shadow monster"; case 52: return "Ghost monster resistance +" + .@s$ + "%"; case 53: return "ATK +" + .@s$ + "% against Ghost monster"; case 54: return "Undead monster resistance +" + .@s$ + "%"; case 55: return "ATK +" + .@s$ + "% against Undead monster"; case 56: return "Neutral monster magic resistance +" + .@s$ + "%"; case 57: return "MATK +" + .@s$ + "% against Neutral monster"; case 58: return "Water monster magic resistance +" + .@s$ + "%"; case 59: return "MATK +" + .@s$ + "% against Water monster"; case 60: return "Earth monster magic resistance +" + .@s$ + "%"; case 61: return "MATK +" + .@s$ + "% against Earth monster"; case 62: return "Fire monster magic resistance +" + .@s$ + "%"; case 63: return "MATK +" + .@s$ + "% against Fire monster"; case 64: return "Wind monster magic resistance +" + .@s$ + "%"; case 65: return "MATK +" + .@s$ + "% against Wind monster"; case 66: return "Poison monster magic resistance +" + .@s$ + "%"; case 67: return "MATK +" + .@s$ + "% against Poison monster"; case 68: return "Holy monster magic resistance +" + .@s$ + "%"; case 69: return "MATK +" + .@s$ + "% against Holy monster"; case 70: return "Shadow monster magic resistance +" + .@s$ + "%"; case 71: return "MATK +" + .@s$ + "% against Shadow monster"; case 72: return "Ghost monster magic resistance +" + .@s$ + "%"; case 73: return "MATK +" + .@s$ + "% against Ghost monster"; case 74: return "Undead monster magic resistance +" + .@s$ + "%"; case 75: return "MATK +" + .@s$ + "% against Undead monster"; case 76: return "Armor element Neutral"; case 77: return "Armor element Water"; case 78: return "Armor element Earth"; case 79: return "Armor element Fire"; case 80: return "Armor element Wind"; case 81: return "Armor element Poison"; case 82: return "Armor element Holy"; case 83: return "Armor element Shadow"; case 84: return "Armor element Ghost"; case 85: return "Armor element Undead"; case 87: return "Formless monster resistance +" + .@s$ + "%"; case 88: return "Undead monster resistance +" + .@s$ + "%"; case 89: return "Brute monster resistance +" + .@s$ + "%"; case 90: return "Plant monster resistance +" + .@s$ + "%"; case 91: return "Insect monster resistance +" + .@s$ + "%"; case 92: return "Fish monster resistance +" + .@s$ + "%"; case 93: return "Demon monster resistance +" + .@s$ + "%"; case 94: return "Demihuman monster resistance +" + .@s$ + "%"; case 95: return "Angel monster resistance +" + .@s$ + "%"; case 96: return "Dragon monster resistance +" + .@s$ + "%"; case 97: return "ATK +" + .@s$ + "% against Formless monster"; case 98: return "ATK +" + .@s$ + "% against Undead monster"; case 99: return "ATK +" + .@s$ + "% against Brute monster"; case 100: return "ATK +" + .@s$ + "% against Plant monster"; case 101: return "ATK +" + .@s$ + "% against Insect monster"; case 102: return "ATK +" + .@s$ + "% against Fish monster"; case 103: return "ATK +" + .@s$ + "% against Demon monster"; case 104: return "ATK +" + .@s$ + "% against Demihuman monster"; case 105: return "ATK +" + .@s$ + "% against Angel monster"; case 106: return "ATK +" + .@s$ + "% against Dragon monster"; case 107: return "MATK +" + .@s$ + "% against Formless monster"; case 108: return "MATK +" + .@s$ + "% against Undead monster"; case 109: return "MATK +" + .@s$ + "% against Brute monster"; case 110: return "MATK +" + .@s$ + "% against Plant monster"; case 111: return "MATK +" + .@s$ + "% against Insect monster"; case 112: return "MATK +" + .@s$ + "% against Fish monster"; case 113: return "MATK +" + .@s$ + "% against Devil monster"; case 114: return "MATK +" + .@s$ + "% against Demihuman monster"; case 115: return "MATK +" + .@s$ + "% against Angel monster"; case 116: return "MATK +" + .@s$ + "% against Dragon monster"; case 117: return "CRIT +" + .@s$ + " against Formless monster"; case 118: return "CRIT +" + .@s$ + " against Undead monster"; case 119: return "CRIT +" + .@s$ + " against Brute monster"; case 120: return "CRIT +" + .@s$ + " against Plant monster"; case 121: return "CRIT +" + .@s$ + " against Insect monster"; case 122: return "CRIT +" + .@s$ + " against Fish monster"; case 123: return "CRIT +" + .@s$ + " against Demon monster"; case 124: return "CRIT +" + .@s$ + " against Demihuman monster"; case 125: return "CRIT +" + .@s$ + " against Angel monster"; case 126: return "CRIT +" + .@s$ + " against Dragon monster"; case 127: return "Pierces " + .@s$ + "% DEF of Formless monster"; case 128: return "Pierces " + .@s$ + "% DEF of Undead monster"; case 129: return "Pierces " + .@s$ + "% DEF of Brute monster"; case 130: return "Pierces " + .@s$ + "% DEF of Plant monster"; case 131: return "Pierces " + .@s$ + "% DEF of Insect monster"; case 132: return "Pierces " + .@s$ + "% DEF of Fish monster"; case 133: return "Pierces " + .@s$ + "% DEF of Demon monster"; case 134: return "Pierces " + .@s$ + "% DEF of Demihuman monster"; case 135: return "Pierces " + .@s$ + "% DEF of Angel monster"; case 136: return "Pierces " + .@s$ + "% DEF of Dragon monster"; case 137: return "Pierces " + .@s$ + "% MDEF of Formless monster"; case 138: return "Pierces " + .@s$ + "% MDEF of Undead monster"; case 139: return "Pierces " + .@s$ + "% MDEF of Brute monster"; case 140: return "Pierces " + .@s$ + "% MDEF of Plant monster"; case 141: return "Pierces " + .@s$ + "% MDEF of Insect monster"; case 142: return "Pierces " + .@s$ + "% MDEF of Fish monster"; case 143: return "Pierces " + .@s$ + "% MDEF of Demon monster"; case 144: return "Pierces " + .@s$ + "% MDEF of Demihuman monster"; case 145: return "Pierces " + .@s$ + "% MDEF of Angel monster"; case 146: return "Pierces " + .@s$ + "% MDEF of Dragon monster"; case 147: return "ATK +" + .@s$ + "% against Normal monster"; case 148: return "ATK +" + .@s$ + "% against Boss monster"; case 149: return "Normal monster resistance +" + .@s$ + "%"; case 150: return "Boss monster resistance +" + .@s$ + "%"; case 151: return "MATK +" + .@s$ + "% against Normal monster"; case 152: return "MATK +" + .@s$ + "% against Boss monster"; case 153: return "Pierces " + .@s$ + "% DEF of Normal monster"; case 154: return "Pierces " + .@s$ + "% DEF of Boss monster"; case 155: return "Pierces " + .@s$ + "% MDEF of Normal monster"; case 156: return "Pierces " + .@s$ + "% MDEF of Boss monster"; case 157: return "ATK +" + .@s$ + "% against Small size monster"; case 158: return "ATK +" + .@s$ + "% against Medium size monster"; case 159: return "ATK +" + .@s$ + "% against Large size monster"; case 160: return "Small monster resistance +" + .@s$ + "%"; case 161: return "Medium monster resistance +" + .@s$ + "%"; case 162: return "Large monster resistance +" + .@s$ + "%"; case 163: return "Nullify weapon's DMG size penalty"; case 164: return "Critical attack +" + .@s$ + "%"; case 165: return "Critical DMG -" + .@s$ + "%"; case 166: return "Long range physical attack +" + .@s$ + "%"; case 167: return "Long range physical DMG -" + .@s$ + "%"; case 168: return "Healing skills +" + .@s$ + "%"; case 169: return "Restoration gained from Healing skills +" + .@s$ + "%"; case 170: return "Variable cast time -" + .@s$ + "%"; case 171: return "After cast delay -" + .@s$ + "%"; case 172: return "Reduces SP cost by " + .@s$ + "%"; case 175: return "Weapon element Neutral"; case 176: return "Weapon element Water"; case 177: return "Weapon element Earth"; case 178: return "Weapon element Fire"; case 179: return "Weapon element Wind"; case 180: return "Weapon element Poison"; case 181: return "Weapon element Holy"; case 182: return "Weapon element Shadow"; case 183: return "Weapon element Ghost"; case 184: return "Weapon element Undead"; case 185: return "Indestructible in battle"; case 186: return "Indestructible in battle"; case 187: return "MATK against Small size monster +" + .@s$ + "%"; case 188: return "MATK against Medium size monster +" + .@s$ + "%"; case 189: return "MATK against Large size monster +" + .@s$ + "%"; case 190: return "Small monster magic resistance +" + .@s$ + "%"; case 191: return "Medium monster magic resistance +" + .@s$ + "%"; case 192: return "Large monster magic resistance +" + .@s$ + "%"; case 193: return "Elemental attacks resistance +" + .@s$ + "%"; case 194: return "Formless monster resistance +" + .@s$ + "%"; case 195: return "Undead monster resistance +" + .@s$ + "%"; case 196: return "Brute monster resistance +" + .@s$ + "%"; case 197: return "Plant monster resistance +" + .@s$ + "%"; case 198: return "Insect monster resistance +" + .@s$ + "%"; case 199: return "Fish monster resistance +" + .@s$ + "%"; case 200: return "Demon monster resistance +" + .@s$ + "%"; case 201: return "Demihuman monster resistance +" + .@s$ + "%"; case 202: return "Angel monster resistance +" + .@s$ + "%"; case 203: return "Dragon monster resistance +" + .@s$ + "%"; case 206: return "Demi-Human players resistance + " + .@s$ + "%"; case 207: return "Doram players resistance +" + .@s$ + "%"; case 208: return "ATK against Demi-Human players +" + .@s$ + "%"; case 209: return "ATK against Doram players +" + .@s$ + "%"; case 210: return "MATK against Demi-Human players +" + .@s$ + "%"; case 211: return "MATK against Doram players +" + .@s$ + "%"; case 212: return "Critical +" + .@s$ + " for Demi-Human players"; case 213: return "Critical +" + .@s$ + " for Doram players"; case 214: return "Pierces " + .@s$ + "% DEF of Demi-Human players"; case 215: return "Pierces " + .@s$ + "% DEF of Doram players"; case 216: return "Pierces " + .@s$ + "% MDEF of Demi-Human players"; case 217: return "Pierces " + .@s$ + "% MDEF of Doram players"; case 218: return "Received reflected DMG -" + .@s$ + "%"; case 219: return "Melee physical DMG +" + .@s$ + "%"; case 220: return "Melee physical DMG -" + .@s$ + "%"; case 221: return "Neutral elemental magic skill DMG +" + .@s$ + "%"; case 222: return "Water elemental magic skill DMG +" + .@s$ + "%"; case 223: return "Earth elemental magic skill DMG +" + .@s$ + "%"; case 224: return "Fire elemental magic skill DMG +" + .@s$ + "%"; case 225: return "Wind elemental magic skill DMG +" + .@s$ + "%"; case 226: return "Poison elemental magic skill DMG +" + .@s$ + "%"; case 227: return "Holy elemental magic skill DMG +" + .@s$ + "%"; case 228: return "Shadow elemental magic skill DMG +" + .@s$ + "%"; case 229: return "Ghost elemental magic skill DMG +" + .@s$ + "%"; case 230: return "Undead elemental magic skill DMG +" + .@s$ + "%"; case 231: return "All elemental magic skill DMG +" + .@s$ + "%"; case 232: return "EXP gained from Formless race +" + .@s$ + "%"; case 233: return "EXP gained from Undead race +" + .@s$ + "%"; case 234: return "EXP gained from Brute race +" + .@s$ + "%"; case 235: return "EXP gained from Plant race +" + .@s$ + "%"; case 236: return "EXP gained from Insect race +" + .@s$ + "%"; case 237: return "EXP gained from Fish race +" + .@s$ + "%"; case 238: return "EXP gained from Demon race +" + .@s$ + "%"; case 239: return "EXP gained from Demi-Human race +" + .@s$ + "%"; case 240: return "EXP gained from Angel race +" + .@s$ + "%"; case 241: return "EXP gained from Dragon race +" + .@s$ + "%"; case 242: return "EXP gained from all races +" + .@s$ + "%"; case 243: return "POW + " + .@s$; case 244: return "SPL + " + .@s$; case 245: return "STA + " + .@s$; case 246: return "WIS + " + .@s$; case 247: return "CON + " + .@s$; case 248: return "CRT + " + .@s$; case 249: return "P.ATK + " + .@s$; case 250: return "S.MATK + " + .@s$; case 251: return "RES + " + .@s$; case 252: return "MRES + " + .@s$; case 253: return "H.PLUS + " + .@s$; case 254: return "C.RATE + " + .@s$; default: return "Unknow Random Option"; } }
-
How to add full AP recovery on Healer NPC
Racaae replied to ADMSarah's question in Scripting Support
Hi. From \doc\script_commands.txt *healap <ap>{,<char_id>}; This command will heal a set amount of AP on the invoking character. healap 10; // This will give 10 AP healap -10; // This will remove 10 AP Example: prontera,161,167,3 script HP and AP Healer 4_F_NURSE,{ specialeffect2 EF_HEAL2; percentheal 100,100; healap 200; end; }- 1 reply
-
- 1
-
-
Hola, yo diría que rAthena es el emulador más actualizado. Pero gran parte del contenido actual toma tiempo para ingresar al emulador, la atención se centra en el contenido permanente, por lo que no creo que haya ningún plan para agregar eventos temporales como Booster Promotion. Los errores de sprite/bmp están relacionados con los archivos del juego (GRF, Data y System folder). Aquí hay un excelente proyecto de traducción al inglés: https://github.com/llchrisll/ROenglishRE. Esta es la antigua Biblioteca Prontera. Se renovaron y cambiaron mapas, junto con los NPC. Tu página de Quest no tiene sus coordenadas actualizadas. Puedes encontrar a Jerry en la nueva biblioteca: prt_elib,57,18. Y el archivo de este NPC está en /npc/re/quests/quests_16_2_illusion.txt Este mensaje fue generado usando Google Translate, perdón por los errores.
-
Hi. Use OnInit and initnpctimer to trigger the NPC without attached player. Then use unitskillusepos to cast the skill anywhere. Example: prontera,155,114,4 script StormGust Wizard 4_M_JOB_WIZARD,{ end; OnTimer3000: unitskillusepos getnpcid(0),"WZ_STORMGUST", 10, .x, .y-7, -6; stopnpctimer; initnpctimer; end; OnInit: getmapxy(.map$, .x, .y, BL_NPC); initnpctimer; end; } *unitskillusepos <GID>,<skill id>,<skill lvl>,<x>,<y>{,<casttime>,<cancel>,<Line_ID>,<ignore_range>};
-
Hello. Find this line: if (select(" ~ Change into ^0055FF" + jobname(.@i) + "^000000 class: ~ ^777777" + ((getargcount() > 1) ? "Go back" : "Cancel") + "^000000") == 1) { And insert this code below it: if (BaseJob == Job_Novice || BaseJob == Job_Summoner) .@cost = 50000; else .@cost = 100000; if (Zeny < .@cost) { mes "[Job Master]"; mes "Sorry. You don't have enough zeny."; mes "You need ^0000FF" + F_InsertComma(.@cost) + "z^000000 to job change."; close; } Zeny -= .@cost;
-
Hello. Open file \db\import\skill_db.yml and insert the following: Body: - Id: 10013 Name: GD_EMERGENCYCALL Cooldown: 300000 FixedCastTime: 5000 Change the value (miliseconds) in Cooldown and/or the Casttime to reduce the time waiting for the skill. 300000 = 300 seconds = 5 minutes 5000 = 5 seconds
-
I believe some clients stop reading later entries in DATA.INI. For example: read from 0 to 9 normal, then ignore 10 11 and 12. maps 17_1 17_2.zip
-
Script to Block Specific Skill for All Players
Racaae replied to Jinun's question in Script Requests
Avoid conflicts. Base renewal rAthena uses zone 9 for "Wave Mode". -
Script to Block Specific Skill for All Players
Racaae replied to Jinun's question in Script Requests
Hi. You can create a new restricted zone that blocks Warp Portal and use a loop to activate and deactivate it in every single map during your event. Add this in your \db\import\skill_nocast_db.txt //---------------------------------------------------------------------------- // Zone 10 - Temporary (event only) //---------------------------------------------------------------------------- 27,16384 //disables skill id 27 AL_WARP (warp portal) on zone 10 Save the file. Use @reloadskilldb or restart the server. Insert this in the NPC when the event starts: freeloop(1); for(.@i = 1; .@i < 1400; .@i++) { .@map$ = mapid2name(.@i); if (.@map$ != "") { setmapflag .@map$, mf_restricted, 10; } } freeloop(0); And insert this when the event ends: freeloop(1); for(.@i = 1; .@i < 1400; .@i++) { .@map$ = mapid2name(.@i); if (.@map$ != "") { removemapflag .@map$, mf_restricted, 10; } } freeloop(0); Save the file. Use @reloadscript/@reloadnpcfile or restart the server. -
tur_d04_i.zip
-
Don't know. Find if (getcharid(2, convertpcinfo(.@gid[.@i],CPC_NAME)) == $koegid) { getitem 35002, 1, .@gid[.@i]; dispbottom "You have been rewarded for conquering KoE.", 0x000000, convertpcinfo(.@gid[.@i],CPC_CHAR); } Add below it: else { getitem 607, 1, .@gid[.@i]; //consolation prize dispbottom "You have been rewarded for participating KoE.", 0x000000, convertpcinfo(.@gid[.@i],CPC_CHAR); }
-
Find OnInit and add these lines below it: setmapflag "guild_vs1", mf_loadevent; $@KoE_limit = 12; //how many guild members can participate Then add this anywhere: OnPCLoadMapEvent: if (strcharinfo(3) == "guild_vs1") { .@joined = getMapGuildUsers("guild_vs1",getcharid(2)); if (.@joined > $@KoE_limit) { dispbottom "Sorry. Your Guild has reached the limit of " + $@KoE_limit + " people on KoE."; dispbottom "Teleporting you out now."; warp "SavePoint",0,0; } } end; The OnPCLoadMapEvent will trigger when anyone enters the map, do a check on how many guild members are participating and then warp the player out if reached the limit. Find: if ( !getvariableofnpc( .start, "KoE" ) ) close; And add below it: .@joined = getMapGuildUsers("guild_vs1",getcharid(2)); if (.@joined >= $@KoE_limit) { clear; mes "[The King]"; mes "^FF0000Sorry. Your Guild has reached the limit of " + $@KoE_limit + " people on KoE.^000000"; close; } This will make the entrance NPC also do the same check.
-
OP shared solution on the script topic:
-
Hello. You can use getmapunits and check for each player' guild to deliver the prize to winner guild members, Find this: warpguild "guild_vs1",49,53,$koegid; And add the following lines below it: getmapunits(BL_PC, "guild_vs1", .@gid); for(.@i = 0; .@i < getarraysize(.@gid); .@i++) { if (getcharid(2, convertpcinfo(.@gid[.@i],CPC_NAME)) == $koegid) { getitem 35002, 1, .@gid[.@i]; dispbottom "You have been rewarded for conquering KoE.", 0x000000, convertpcinfo(.@gid[.@i],CPC_CHAR); } } Also find and remove this line: getitem 35002,1; Save the file then use @reloadscript or restart the server.
-
Hi. The server is trying to find table named "rank_mvp", which does not exist. The table used in the script you shared is called "mvp". You need to pick a name to use, it cannot have two different names. In case you have more errors, drop/delete both tables "mvp" and "premio_mvp" and insert this code in any NPC: OnInit: query_sql "CREATE TABLE IF NOT EXISTS `mvp` (" + " `char_id` INT(11) NOT NULL," + " `account_id` INT(11) NOT NULL," + " `name` VARCHAR(30) NOT NULL," + " `mvps` INT(11) DEFAULT 0," + " `pontos` INT(11) DEFAULT 0," + " `premio_mvp` INT(11) DEFAULT 0," + " PRIMARY KEY (`char_id`)" + " )"; query_sql "CREATE TABLE IF NOT EXISTS `premio_mvp` (" + " `id` INT(11) NOT NULL AUTO_INCREMENT," + " `historico` INT(11) NOT NULL," + " `account_id` INT(11) NOT NULL," + " `name` VARCHAR(50) NOT NULL," + " `mvps` INT(11) NOT NULL," + " `pontos` INT(11) NOT NULL," + " PRIMARY KEY (`id`)" + " )"; end; } Then reload the NPCs. It's working fine here, I tested. - script mvppoint01 -1,{ OnNPCKillEvent: if (getgmlevel() >= 10 && getgmlevel() <= 98) { end; } setarray .@monsterID[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,1389,1418,1492,1511,1583,1623,1630,1658,1685,1688,1719,1785,1885,2068, 2800,2801,2802,2803,2844,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2830,2831,2832,2834,2839, 2850,2851,2852,2853,2894,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2880,2881,2882,2884,2889,2898; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if (killedrid == .@monsterID[@a]) { set @CID,getcharid(0);set @name$,""; query_sql "SELECT `name` FROM `mvp` WHERE `char_id`="+@CID+"",@name$; if ( @name$ == "" ) { query_sql "INSERT INTO `mvp` (`char_id`,`account_id`,`name`,`mvps`,`pontos`) VALUES ("+@CID+",'"+getcharid(3)+"','"+strcharinfo(0)+"',1,1)",@esc$; set #MVPPOINTS,#MVPPOINTS+1; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } query_sql "UPDATE `mvp` SET `mvps` = `mvps` +1,`pontos` = `pontos` +1 WHERE `char_id`="+@CID+"",@esc$; query_sql "SELECT `name`,`mvps`, `pontos` FROM `mvp` ORDER BY `pontos` DESC LIMIT "+$topmvp+"",@nick$,@kills,@mvppoints; set #MVPPOINTS,#mvppontos; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; } end; OnInit: query_sql "CREATE TABLE IF NOT EXISTS `mvp` (" + " `char_id` INT(11) NOT NULL," + " `account_id` INT(11) NOT NULL," + " `name` VARCHAR(30) NOT NULL," + " `mvps` INT(11) DEFAULT 0," + " `pontos` INT(11) DEFAULT 0," + " `premio_mvp` INT(11) DEFAULT 0," + " PRIMARY KEY (`char_id`)" + " )"; query_sql "CREATE TABLE IF NOT EXISTS `premio_mvp` (" + " `id` INT(11) NOT NULL AUTO_INCREMENT," + " `historico` INT(11) NOT NULL," + " `account_id` INT(11) NOT NULL," + " `name` VARCHAR(50) NOT NULL," + " `mvps` INT(11) NOT NULL," + " `pontos` INT(11) NOT NULL," + " PRIMARY KEY (`id`)" + " )"; end; } - script mvppoint02 -1,{ OnNPCKillEvent: if(getgmlevel() >= 10 && getgmlevel() <= 98) { end; } setarray .@monsterID[0],1708,1734,1751,1768,1779,1832,1871,1917,1990,1991,2202, 2833,2835,2836,2837,2838,2840,2841, 2883,2885,5886,2887,2888,2890,2891,2895,2899; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set @CID,getcharid(0);set @name$,""; query_sql "SELECT `name` FROM `mvp` WHERE `char_id`="+@CID+"",@name$; if ( @name$ == "" ) { query_sql "INSERT INTO `mvp` (`char_id`,`account_id`,`name`,`mvps`,`pontos`) VALUES ("+@CID+",'"+getcharid(3)+"','"+strcharinfo(0)+"',1,3)",@esc$; set #MVPPOINTS,#MVPPOINTS+3; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } set #MVPPOINTS,#MVPPOINTS+3; query_sql "UPDATE `mvp` SET `mvps` = `mvps` +1,`pontos` = `pontos` +3 WHERE `char_id`="+@CID+"",@esc$; message strcharinfo(0),"[Ragnaeok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } } - script mvppoint03 -1,{ OnNPCKillEvent: if(getgmlevel() >= 10 && getgmlevel() <= 98) { end; } setarray .@monsterID[0],1646,1647,1648,1649,1650,1651,1874,1929,1956,1957,2022, 2824,2825,2826,2827,2828,2829,2843, 2874,2875,2876,2877,2878,2879,2893,2896,2897; // ID Dos Boss for(set @a,0; @a <= getarraysize(.@monsterID); set @a,@a+1) if(killedrid == .@monsterID[@a]){ set @CID,getcharid(0);set @name$,""; query_sql "SELECT `name` FROM `mvp` WHERE `char_id`="+@CID+"",@name$; if ( @name$ == "" ) { query_sql "INSERT INTO `mvp` (`char_id`,`account_id`,`name`,`mvps`,`pontos`) VALUES ("+@CID+",'"+getcharid(3)+"','"+strcharinfo(0)+"',1,5)",@esc$; set #MVPPOINTS,#MVPPOINTS+5; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } set #MVPPOINTS,#MVPPOINTS+5; query_sql "UPDATE `mvp` SET `mvps` = `mvps` +1,`pontos` = `pontos` +5 WHERE `char_id`="+@CID+"",@esc$; message strcharinfo(0),"[Ragnarok]: Você possui "+#MVPPOINTS+" ponto(s) de MvPs."; end; } } - script ranking_MVP_semanal -1,{ OnMon0406: query_sql "SELECT `account_id`,`name`,`mvps`,`pontos` FROM `mvp` WHERE `pontos`>='1' ORDER BY `pontos` DESC, `mvps` DESC LIMIT 0,1",$@MVPSemanal,$@MVPnome$,$@MVPsqt,$@MVPPts; if($@MVPSemanal) { set $historicomvp,$historicomvp+1; query_sql "UPDATE `mvp` SET `premio_mvp` = 607 WHERE `account_id`='"+$@MVPSemanal+"'"; Announce "Vencedor do ranking MvP semanal é: "+$@MVPnome$+", MvPs: "+$@MVPsqt+" Pontos: "+$@MVPPts+".",8; query_sql "UPDATE `mvp` SET `mvps`='0',`pontos`='0'"; query_sql "INSERT INTO `premio_mvp` (`historico`,`account_id`,`name`,`mvps`,`pontos`) VALUES ('"+$historicomvp+"','"+$@MVPSemanal+"','"+$@MVPnome$+"','"+$@MVPsqt+"','"+$@MVPPts+"')"; sleep2 4000; Announce "O Player "+$@MVPnome$+" receberá como prêmio: 1 "+getitemname(607)+".",8; end; } } //==================== prontera,127,213,5 script Ranking Mvp 857,{ if (getgmlevel() > 90) { mes "[^0000FFTop MvP "+$topmvp+"^000000]"; mes "O que deseja fazer?"; switch(select("Ver Top",(($a) ? "Desligar anúncio":"Ligar anúncio"),"Resetar Top MvP:Número de posições")) { case 1: break; case 2: set $a, ($a) ? 0 : 1; close; case 3: query_sql "TRUNCATE `mvp`"; close; case 4: mes "Digite o número de posições do top mvp."; input $topmvp; break; } next; } query_sql "SELECT `name`,`mvps`, `pontos` FROM `mvp` ORDER BY `pontos` DESC LIMIT "+$topmvp+"",.@names$,.@mvpkills,.@mvppontos; message strcharinfo(0), "---------------[Top MvP "+$topmvp+"]---------------"; for (set @c, 0; @c < $topmvp; set @c, @c + 1) { message strcharinfo(0),"-----------------------------------------------"; message strcharinfo(0), "("+(@c+1)+"º) Player: "+.@names$[@c]+" | Matou: "+.@mvpkills[@c]+" MvP's | Pontos: "+.@mvppontos[@c]+"."; } close; }
-
Hi, you can use getmapxy and unitskillusepos. Example: prontera,161,179,3 script Prontera Church Priest 4_GEFFEN_09,7,7,{ OnTouch: .@Delay = 25; // Delay, in seconds if (@HD > gettimetick(2)) { npctalk strnpcinfo(1) + " : " + strcharinfo(0) + " I've just buffed you! Wait some more time", strnpcinfo(0), bc_self; end; } if (.@Delay) @HD = gettimetick(2) + .@Delay; unitskillusepos .id,"PR_SANCTUARY",10,.x,.y,-10; sleep2 500; callsub S_Check; if (!getstatus(SC_BLESSING)) npcskill "AL_BLESSING",10,1,1; callsub S_Check; if (getstatus(SC_ORCISH) || getstatus(SC_POISON) || getstatus(SC_CURSE) || getstatus(SC_SILENCE) || getstatus(SC_CONFUSION) || getstatus(SC_BLIND) || getstatus(SC_BLEEDING)) { npcskill F_Rand("AL_CURE", "PR_STRECOVERY"),1,1,1; sc_end SC_ORCISH; sc_end SC_POISON; sc_end SC_CURSE; sc_end SC_SILENCE; sc_end SC_CONFUSION; sc_end SC_BLIND; sc_end SC_BLEEDING; callsub S_Check; } npcskill "AL_INCAGI",10,1,1; callsub S_Check; npcskill "AL_ANGELUS",10,1,1; callsub S_Check; npcskill "PR_IMPOSITIO",5,1,1; callsub S_Check; npcskill "PR_SUFFRAGIUM",3,1,1; callsub S_Check; npcskill "PR_MAGNIFICAT",5,1,1; callsub S_Check; npcskill "PR_GLORIA",5,1,1; callsub S_Check; npcskill "PR_KYRIE",10,1,1; callsub S_Check; npcskill "HP_ASSUMPTIO",5,1,1; callsub S_Check; if (checkre(0)) { unitskillusepos .id,"AB_EPICLESIS",5,rand(.x-3,.x+3),rand(.y-3,.y+3),-10; callsub S_Check; npcskill "AB_RENOVATIO",4,1,1; callsub S_Check; npcskill "AB_SECRAMENT",5,1,1; callsub S_Check; } npctalk strnpcinfo(1) + " : Come back anytime " + strcharinfo(0) + "!", strnpcinfo(0), bc_self; end; S_Check: sleep2 rand(700,2000); getmapxy(.@pc_map$,.@pc_x, .@pc_y); if (distance(.x,.y,.@pc_x,.@pc_y) > 7) { npctalk strnpcinfo(1) + " : " + strcharinfo(0) + " I'm not walking just to buff you. Please come closer.", strnpcinfo(0), bc_self; end; } return; OnInit: .id = getnpcid(0, strnpcinfo(0)); getmapxy(.map$, .x, .y, BL_NPC); end; }
-
Hi //===== Script for rAthena by Racaae ========================= //= Enchant Transferer //= https://rathena.org/board/topic/142357-question-about-transfer-enchant-npc-random-option/ //===== Additional Comments: ================================= //= Modified from Sader1992' enchant npc //= 1.1 = Added option to transfer all effects at same time; Option //= to enable only 1 type of tranfer; and option to enforce same //= equipment type only. //============================================================ prontera,165,215,5 script Enchant Transferer 4_BULL,{ disable_items; mes "[Enchant Transferer]"; mes "Hello! Do you want to ^0000FFtransfer " + .s$[.TransferType] + "^000000 from your equipped item to another item?"; mes "The process has no chance of failure and items keep their refine, cards and other effects."; if (.ZenyCost) mes "This will cost ^0000FF" + F_InsertComma(.ZenyCost) + "z^000000 only!"; next; if (.TransferType == 2) { if (select("Random Option Transfer", "Enchant Socket Transfer", "Cancel") == 3) close; } if (.TransferType == 1 || @menu == 1) .@mode = true; mes "[Enchant Transferer]"; mes "Which equipped item has the " + .s$[.@mode] + "s?"; for(.@i = 0; .@i < getarraysize(.loc_names$); .@i++) { if (getequipid(.loc_EQI[.@i])>-1) set .@armor_menu$, .@armor_menu$ + .loc_names$[.@i] + " [ ^E81B02" + getitemname(getequipid(.loc_EQI[.@i])) + "^000000 ]:"; else set .@armor_menu$, .@armor_menu$ + .loc_names$[.@i] + " [ ^D6C4E8" + "No Equip" + "^000000 ]:"; } .@input_loc = select(.@armor_menu$) -1; clear; mes "[Enchant Transferer]"; if (getequipid(.loc_EQI[.@input_loc]) < 0){ mes "You don't have item equipped there."; close; } .@item = getequipid(.loc_EQI[.@input_loc]); .@refine = getequiprefinerycnt(.loc_EQI[.@input_loc]); .@card0 = getequipcardid(.loc_EQI[.@input_loc],0); .@card1 = getequipcardid(.loc_EQI[.@input_loc],1); .@card2 = getequipcardid(.loc_EQI[.@input_loc],2); .@card3 = getequipcardid(.loc_EQI[.@input_loc],3); for(.@i=0; .@i < (MAX_ITEM_RDM_OPT); .@i++) { .@r_id[.@i] = getequiprandomoption(.loc_EQI[.@input_loc],.@i,ROA_ID); .@r_v[.@i] = getequiprandomoption(.loc_EQI[.@input_loc],.@i,ROA_VALUE); .@r_p[.@i] = getequiprandomoption(.loc_EQI[.@input_loc],.@i,ROA_PARAM); if (.@r_id[.@i]) .@r_LastOcupedSlot = .@i; } if (.@mode) { if (getarraysize(.@r_id) == 0) { mes "This item has no Random Options..."; close; } if (getarraysize(.@r_id) == 1) .@HasOnlyOneEnchant = true; } else if (!.@card0 && !.@card1 && !.@card2 && !.@card3) { mes "This item has no enchants..."; close; } if (.CanChoose) { if (!.@HasOnlyOneEnchant) { mes "Which effect to transfer?"; if (.@mode) { for(.@i=0; .@i < 5; .@i++) { if (.@r_id[.@i]) .@slot_menu$ += F_RDMOPT_Name(.@r_id[.@i],.@r_v[.@i]); .@slot_menu$ += ":"; } } else { for(.@i=0; .@i < 4; .@i++) { if (getequipcardid(.loc_EQI[.@input_loc], .@i)) .@slot_menu$ += "[ ^E81B02" + getitemname(getequipcardid(.loc_EQI[.@input_loc],.@i)) + "^000000 ]:"; else .@slot_menu$ += ":"; } } .@input_slot = select(.@slot_menu$) -1; set .@item, getequipid(.loc_EQI[.@input_loc]); clear; mes "[Enchant Transferer]"; } } else mes "All " + .s$[.@mode] + "s from this item will be transferred."; if (.AnyEquip) { .@armor_menu$ = ""; for(.@i=0; .@i < getarraysize(.loc_names$); .@i++) .@armor_menu$ += .loc_names$[.@i] + ":"; .@output_type = select(.@armor_menu$) -1; } else .@output_type = .@input_loc; getinventorylist; for(.@i = 0; .@i < @inventorylist_count; .@i++) { .@item_id = @inventorylist_id[.@i]; if (getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_ARMOR && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_WEAPON && getiteminfo(.@item_id, ITEMINFO_TYPE) != IT_SHADOWGEAR) continue; .@item_type = getiteminfo(.@item_id, ITEMINFO_LOCATIONS); if (.@item_type & .loc_EQP[.@output_type] && !@inventorylist_equip[.@i]) { .@item_ref = getarraysize(.@equipment_id_list); if (countinarray(.@equipment_id_list, .@item_id)) continue; .@equipment_id_list[.@item_ref] = @inventorylist_id[.@i]; .@menu_labels$[.@item_ref] = getitemname(@inventorylist_id[.@i]); } } if (!getarraysize(.@equipment_id_list[0])) { mes "But there are no items of this category in your inventory."; mes "The transfer can't happen."; close; } mes "To what item in your inventory you want to transfer?"; next; .@index = select(implode(.@menu_labels$, ":")) - 1; .@output_id = .@equipment_id_list[.@index]; mes "[Enchant Transferer]"; mes "You selected " + getitemname(.@output_id) + "."; if (countitem(.@output_id) > 1) { mes "You have more than one of this item."; mes "I won't touch items that you have more than one with you. It's to avoid mistakes."; close; } getinventorylist; .@i2 = inarray(@inventorylist_id, .@output_id); .@output_refine = @inventorylist_refine[.@i2]; .@output_card0 = @inventorylist_card1[.@i2]; .@output_card1 = @inventorylist_card2[.@i2]; .@output_card2 = @inventorylist_card3[.@i2]; .@output_card3 = @inventorylist_card4[.@i2]; for(.@i = 0; .@i < (MAX_ITEM_RDM_OPT); .@i++) { .@output_r_id[.@i] = getd("@inventorylist_option_id" + (.@i + 1) + "[" + .@i2 + "]"); .@output_r_v[.@i] = getd("@inventorylist_option_value" + (.@i + 1) + "[" + .@i2 + "]"); .@output_r_p[.@i] = getd("@inventorylist_option_parameter" + (.@i + 1) + "[" + .@i2 + "]"); } if (.@mode) { for(.@i = 0; .@i < MAX_ITEM_RDM_OPT; .@i++) { if (.@output_r_id[.@i] == 0) { .@output_slot = .@i; .@ok = true; break; } } if (!.@ok) { mes "You already have full Random Options in this item."; close; } } else { mes "Transfer to which slot?"; .@slot_menu$ = ""; for(.@i = 0; .@i < 4; .@i++) { if (getd(".@output_card" + .@i)) .@slot_menu$ += "[^E81B02" + getitemname(getd(".@output_card" + .@i)) + "^000000 ]:"; else .@slot_menu$ += "[^D6C4E8" + "Empty" + "^000000 ]:"; } .@output_slot = select(.@slot_menu$) -1; if (!.Overwrite) { if(getd(".@output_card" + .@output_slot)) { mes "You already have enchant in this slot."; close; } } } clear; mes "[Enchant Transferer]"; if (.@mode) { if (!.CanChoose && !.@HasOnlyOneEnchant) { mes "Transfer:"; for(.@i = 0; .@i < MAX_ITEM_RDM_OPT; .@i++) { if (.@r_id[.@i]) mes "* ^FF7700" + F_RDMOPT_Name(.@r_id[.@i],.@r_v[.@i]) + "^000000"; } } else { if (.@HasOnlyOneEnchant) .@input_slot = .@r_LastOcupedSlot; mes "Transfer: ^FF7700" + F_RDMOPT_Name(.@r_id[.@input_slot],.@r_v[.@input_slot]) + "^000000"; } } else mes "Transfer: " + mesitemlink(getequipcardid(.loc_EQI[.@input_loc], .@input_slot)); mes "^FF0000From: " + (.@refine?"+" + .@refine + " ":"") + getitemname(getequipid(.loc_EQI[.@input_loc])) + "^000000"; mes "^0000FFTo: " + (.@output_refine?"+" + .@output_refine + " ":"") + getitemname(.@output_id) + "^000000"; mes "Are you sure?"; next; if(select("Cancel.", "Confirm") == 1) close; mes "[Enchant Transferer]"; if (.ZenyCost && Zeny < .ZenyCost) { mes "Sorry, but you don't have enough zeny."; close; } mes "Stay put while the process is ongoing."; close2; specialeffect2 EF_MAPPILLAR; progressbar "ffff00", .progress_time; // anti-hack if (callfunc("F_IsEquipIDHack", .loc_EQI[.@input_loc], .@item) || callfunc("F_IsEquipCardHack", .loc_EQI[.@input_loc], .@card0, .@card1, .@card2, .@card3) || callfunc("F_IsEquipRefineHack", .loc_EQI[.@input_loc], .@refine) || countitem(.@output_id) != 1) { mes "[Enchant Transferer]"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } if (.ZenyCost && Zeny < .ZenyCost) { mes "Sorry, but you don't have enough zeny."; close; } Zeny -= .ZenyCost; if (.@mode) { if (.CanChoose || getarraysize(.@r_id) < 2) { .@output_r_id[.@output_slot] = .@r_id[.@input_slot]; .@output_r_v[.@output_slot] = .@r_v[.@input_slot]; .@output_r_p[.@output_slot] = .@r_p[.@input_slot]; deletearray .@r_id[.@input_slot], 1; deletearray .@r_v[.@input_slot], 1; deletearray .@r_p[.@input_slot], 1; } else { copyarray .@output_r_id[0], .@r_id[0], MAX_ITEM_RDM_OPT; copyarray .@output_r_v[0], .@r_v[0], MAX_ITEM_RDM_OPT; copyarray .@output_r_p[0], .@r_p[0], MAX_ITEM_RDM_OPT; deletearray .@r_id[0], MAX_ITEM_RDM_OPT; deletearray .@r_v[0], MAX_ITEM_RDM_OPT; deletearray .@r_p[0], MAX_ITEM_RDM_OPT; } } else { setd(".@output_card" + .@output_slot, getd(".@card" + .@input_slot)); setd(".@card" + .@input_slot, 0); } delequip .loc_EQI[.@input_loc]; delitem .@output_id, 1; getitem3 .@item, 1, 1, .@refine, 0, .@card0, .@card1, .@card2, .@card3,.@r_id,.@r_v,.@r_p; getitem3 .@output_id, 1, 1, .@output_refine, 0, .@output_card0, .@output_card1, .@output_card2, .@output_card3,.@output_r_id,.@output_r_v,.@output_r_p; equip .@item; npctalk "Transfer successful!", strnpcinfo(0), bc_self; end; OnInit: //--------------------------------------------------------------// //-------------------- configuration -----------------------// //--------------------------------------------------------------// //--------------------------------------------------------------// //if you want to remove one from the menu you need to remove it down too!! /or add //--------------------------------------------------------------// setarray .loc_names$, "Upper Headgear","Middle Headgear","Lower Headgear","Weapon","Left Hand","Armor","Garment","Shoes","Accessory Left","Accessory Right"; setarray .loc_EQI, EQI_HEAD_TOP,EQI_HEAD_MID,EQI_HEAD_LOW,EQI_HAND_R,EQI_HAND_L,EQI_ARMOR,EQI_GARMENT,EQI_SHOES,EQI_ACC_L,EQI_ACC_R; .TransferType = 1; //0=Socket Enchant only / 1=Random Option only / 2=Both .CanChoose = false; //if true then can choose which effects to transfer .ZenyCost = 500000; //if you don't want zeny requirment set it to 0 .AnyEquip = false; //if true then can transfer to any equipment type .Overwrite = true; //if true then you can overwrite the enchant .progress_time = 3; //the time (seconds) that needed to wait until the end //--------------------------------------------------------------// //--------------------------------------------------------------// setarray .s$, "enchantment", "Random Option", "random option or socket enchantment"; for(.@i = 0; .@i < getarraysize(.loc_EQI); .@i++) { switch(.loc_EQI[.@i]) { case EQI_HEAD_TOP: .loc_EQP[.@i] = EQP_HEAD_TOP; break; case EQI_ARMOR: .loc_EQP[.@i] = EQP_ARMOR; break; case EQI_HAND_L: .loc_EQP[.@i] = EQP_HAND_L; break; case EQI_HAND_R: .loc_EQP[.@i] = EQP_HAND_R; break; case EQI_GARMENT: .loc_EQP[.@i] = EQP_GARMENT; break; case EQI_SHOES: .loc_EQP[.@i] = EQP_SHOES; break; case EQI_ACC_L: .loc_EQP[.@i] = EQP_ACC_L; break; case EQI_ACC_R: .loc_EQP[.@i] = EQP_ACC_R; break; case EQI_HEAD_MID: .loc_EQP[.@i] = EQP_HEAD_MID; break; case EQI_HEAD_LOW: .loc_EQP[.@i] = EQP_HEAD_LOW; break; case EQI_COSTUME_HEAD_LOW: .loc_EQP[.@i] = EQP_COSTUME_HEAD_LOW; break; case EQI_COSTUME_HEAD_MID: .loc_EQP[.@i] = EQP_COSTUME_HEAD_MID; break; case EQI_COSTUME_HEAD_TOP: .loc_EQP[.@i] = EQP_COSTUME_HEAD_TOP; break; case EQI_COSTUME_GARMENT: .loc_EQP[.@i] = EQP_COSTUME_GARMENT; break; case EQI_SHADOW_ARMOR: .loc_EQP[.@i] = EQP_SHADOW_ARMOR; break; case EQI_SHADOW_WEAPON: .loc_EQP[.@i] = EQP_SHADOW_WEAPON; break; case EQI_SHADOW_SHIELD: .loc_EQP[.@i] = EQP_SHADOW_SHIELD; break; case EQI_SHADOW_SHOES: .loc_EQP[.@i] = EQP_SHADOW_SHOES; break; case EQI_SHADOW_ACC_R: .loc_EQP[.@i] = EQP_SHADOW_ACC_R; break; case EQI_SHADOW_ACC_L: .loc_EQP[.@i] = EQP_SHADOW_ACC_L; break; } } end; }
-
Script: | skill "MC_PUSHCART",9; skill "MC_VENDING",4; EquipScript: | if (!checkcart()) setcart 1; UnEquipScript: | setcart 0;
-
The client couldn't find the icon image for the item. You have to add it in data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item\ Example: data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item\merchant.bmp merchant.bmp