Jump to content

sader1992

Content Moderator
  • Posts

    1691
  • Joined

  • Last visited

  • Days Won

    77

Everything posted by sader1992

  1. to use sql , you need to switch everything to sql including item_db https://github.com/rathena/rathena/blob/08d160aaac8cdd286bbafb32532abe42b8a42376/conf/inter_athena.conf#L154 else , you can try src edit https://github.com/rathena/rathena/blob/08d160aaac8cdd286bbafb32532abe42b8a42376/src/map/cashshop.cpp#L434 to //if( db_use_sqldbs ){ cashshop_read_db_sql(); //} else { // cashshop_read_db_txt(); //} however , never tested it , don't know if there is something else you should change or not to work
  2. @part = select(.@menu$); to @part = select(.@menu$) -1; @line 50 also to translate what Emistry give you you can translate it in the file rathena/npc/other/Global_Functions.txt ////////////////////////////////////////////////////////////////////////////////// // Return the position name of the EQI_* equipment slot. ////////////////////////////////////////////////////////////////////////////////// function script F_getpositionname { switch( getarg(0,999) ) { case EQI_ACC_L: return "Accessory 1"; case EQI_ACC_R: return "Accessory 2"; case EQI_SHOES: return "Shoes"; case EQI_GARMENT: return "Robe"; case EQI_HEAD_LOW: return "Head 3"; case EQI_HEAD_MID: return "Head 2"; case EQI_HEAD_TOP: return "Head"; case EQI_ARMOR: return "Body"; case EQI_HAND_L: return "Left hand"; case EQI_HAND_R: return "Right hand"; case EQI_COSTUME_HEAD_TOP: return "Upper Costume Headgear"; case EQI_COSTUME_HEAD_MID: return "Middle Costume Headgear"; case EQI_COSTUME_HEAD_LOW: return "Lower Costume Headgear"; case EQI_COSTUME_GARMENT: return "Costume Garment"; case EQI_AMMO: return "Arrow/Ammunition"; case EQI_SHADOW_ARMOR: return "Shadow Armor"; case EQI_SHADOW_WEAPON: return "Shadow Weapon"; case EQI_SHADOW_SHIELD: return "Shadow Shield"; case EQI_SHADOW_SHOES: return "Shadow Shoes"; case EQI_SHADOW_ACC_R: return "Shadow Accessory 2"; case EQI_SHADOW_ACC_L: return "Shadow Accessory 1"; default: return "Unknown"; } } this would be better , as your translation would effect every npc uses this function.
  3. my bad sorry , i misread getequipname to getitemname Dx
  4. try setarray .@position$,"Accessory Left","Accessory Right","shoes","Garment","Lower","Middle","Upper","Armor","Left hand","Right hand"; set .@menu$, ""; for(.@i = 0; .@i <getarraysize(.@position$); .@i++) { if(getequipisequiped(.@i)) { set .@menu$, .@menu$ + .@position$[.@i] + " - " + "[" + getequipname(.@i) + "]"; .@equipped = 1; } set .@menu$, .@menu$ + ":"; }
  5. if you want to use a technique like that , you need to use the real order EQI_COMPOUND_ON (-1) - Item slot that calls this script (In context of item script) EQI_ACC_L (0) - Accessory 1 EQI_ACC_R (1) - Accessory 2 EQI_SHOES (2) - Footgear (shoes, boots) EQI_GARMENT (3) - Garment (mufflers, hoods, manteaux) EQI_HEAD_LOW (4) - Lower Headgear (beards, some masks) EQI_HEAD_MID (5) - Middle Headgear (masks, glasses) EQI_HEAD_TOP (6) - Upper Headgear EQI_ARMOR (7) - Armor (jackets, robes) EQI_HAND_L (8) - Left hand (weapons, shields) EQI_HAND_R (9) - Right hand (weapons) EQI_COSTUME_HEAD_TOP (10) - Upper Costume Headgear EQI_COSTUME_HEAD_MID (11) - Middle Costume Headgear EQI_COSTUME_HEAD_LOW (12) - Lower Costume Headgear EQI_COSTUME_GARMENT (13) - Costume Garment EQI_AMMO (14) - Arrow/Ammunition EQI_SHADOW_ARMOR (15) - Shadow Armor EQI_SHADOW_WEAPON (16) - Shadow Weapon EQI_SHADOW_SHIELD (17) - Shadow Shield EQI_SHADOW_SHOES (18) - Shadow Shoes EQI_SHADOW_ACC_R (19) - Shadow Accessory 2 EQI_SHADOW_ACC_L (20) - Shadow Accessory 1 you are not given us the real script you are using in the first place obviously getequipname(.@i) wont give the item name as in your photo! sorry , i misread getequipname to getitemname your script's problem is the left accessory the loop start with 1 and the left acc is 0 https://github.com/rathena/rathena/blob/master/doc/script_commands.txt
  6. --------------------------------------- *makepet <pet id>; This command will create a pet egg and put it in the invoking character's inventory. The kind of pet is specified by pet ID numbers listed in 'db/(pre-)re/pet_db.yml'. The egg is created exactly as if the character just successfully caught a pet in the normal way. // This will make you a poring: makepet 1002; Notice that you absolutely have to create pet eggs with this command. If you try to give a pet egg with 'getitem', pet data will not be created by the char server and the egg will disappear when anyone tries to hatch it. --------------------------------------- --------------------------------------- =================== | 8. Pet Commands | =================== @makeegg <egg ID> Creates a Pet Egg based on the given ID. ---------------------------------------
  7. View File [UnOfficial] Skyfortress Drop/reroll enchantment Functions README FIRST! those are UnOfficial there is 2 main scripts the first one (you need to add it first to your .conf file) SkyFortress_Functions this have the main functions HEADER >> (read it before you use the script) the 2nd main file is SkyFortress_reroll this for the reroll npc this npc requir https://github.com/rathena/rathena/pull/4195 if you didn't apply this PR the npc will give you error! the 3rd file SkyFortress_Test is just for test , do not use it unless you want to test and edit the script to add the drop to your instance , you need to edit the instance script it self , as this not normal drop , it's on event kill drop. if you have problem with the script , you can use the forum post to report it to me, and me or someone else will help you fix it. Submitter sader1992 Submitted 09/15/2019 Category Utilities Video Content Author sader1992
  8. Version 1.0.1

    639 downloads

    README FIRST! those are UnOfficial there is 2 main scripts the first one (you need to add it first to your .conf file) SkyFortress_Functions this have the main functions HEADER >> (read it before you use the script) the 2nd main file is SkyFortress_reroll this for the reroll npc this npc requir https://github.com/rathena/rathena/pull/4195 if you didn't apply this PR the npc will give you error! the 3rd file SkyFortress_Test is just for test , do not use it unless you want to test and edit the script to add the drop to your instance , you need to edit the instance script it self , as this not normal drop , it's on event kill drop. if you have problem with the script , you can use the forum post to report it to me, and me or someone else will help you fix it.
    Free
  9. this src mode only allow the player to redeem the reward , it does not auto redeem for the player , the player must redeem the reward hem self the script you use will allow the first account with the gepard id given to redeem the reward , and if he didn't redeem it with that account , he can't redeem it with another account , he only can redeem it with that account (the first account he login with in the day) i will soon create a function for gepard as planed , if you don't want to wait for god knows how long , the key is this , if the player did redeem the reward , the variable #AttendanceDate would be the date of that day
  10. conf/import/char_conf.txt login_ip: 127.0.0.1 char_ip: vps_ip conf/import/map_conf.txt char_ip: 127.0.0.1 map_ip: vps_ip
  11. try this i used rAthena refiner as a base , as you didn't provide any npc prontera,0,0,0 script refiner 444,{ .@npc_name$ = "refiner"; setarray .@indices[1], EQI_HEAD_TOP, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R, EQI_HEAD_MID, EQI_HEAD_LOW; for(.@i = 1; .@i<getarraysize(.@indices); ++.@i) { if(getequipisequiped(.@indices[.@i])) { .@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]"; .@equipped = 1; } .@menu$ = .@menu$ + ":"; } if (.@equipped == 0) { mes "["+ .@npc_name$ +"]"; mes "I don't think I can refine any items you have..."; close; } .@part = .@indices[select(.@menu$)]; if(!getequipisequiped(.@part)) { //custom check mes "["+ .@npc_name$ +"]"; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion ET_FRET; close; } //Check if the item is refinable... if(!getequipisenableref(.@part)) { mes "["+ .@npc_name$ +"]"; mes "I don't think I can"; mes "refine this item at all..."; close; } //Check to see if the items is already +10 if(getequiprefinerycnt(.@part) >= 10) { mes "["+ .@npc_name$ +"]"; mes "I can't refine this"; mes "any more. This is as"; mes "refined as it gets!"; close; } .@refineitemid = getequipid(.@part); // save id of the item .@refinerycnt = getequiprefinerycnt(.@part); //save refinery count setarray .@card[0], getequipcardid(.@part,0), getequipcardid(.@part,1), getequipcardid(.@part,2), getequipcardid(.@part,3); .@price = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_ZENY_COST); .@material = getequiprefinecost(.@part, REFINE_COST_NORMAL, REFINE_MATERIAL_ID); //editing here .@materialCount = getequiprefinerycnt(.@part) +1; if(inarray(.allowed_items,.@refineitemid) == -1){ mes "sorry, i can't refine " + getitemname(.@refineitemid); end; } switch (getequipweaponlv(.@part)) { case 1: .@safe = 7; break; case 2: .@safe = 6; break; case 3: .@safe = 5; break; case 4: default: .@safe = 4; break; } mes "["+ .@npc_name$ +"]"; mes "To refine this I need"; mes .@materialCount + " ^003366"+getitemname(.@material)+"^000000 and"; mes "a service fee of " + .@price + " Zeny."; mes "Do you really wish to continue?"; next; if(select("Yes:No") == 2){ mes "["+ .@npc_name$ +"]"; mes "Yeah..."; mes "There's no need to"; mes "rush. Take your time."; close; } if(getequippercentrefinery(.@part) < 100) { mes "["+ .@npc_name$ +"]"; mes "Oh no! If I continue to"; mes "refine this, there's a risk it could"; switch(.@material) { case 985: mes "be destroyed! That means that ^FF0000this equipment^000000, and ^FF0000any cards^000000 or special properties added to this armor, ^FF0000will be gone^000000."; break; default: mes "be destroyed, and you'd ^FF0000lose the weapon^000000, any ^FF0000cards in the weapon^000000,"; mes "or any added special properties."; break; } next; mes "["+ .@npc_name$ +"]"; mes "I can't make it any clearer."; mes "Once a weapon is destroyed,"; mes "there's no getting it back."; mes "You really have a chance to"; mes "^FF0000lose this weapon^000000 forever."; mes "Do you still want to refine?"; next; if(select("Yes:No") == 2){ mes "["+ .@npc_name$ +"]"; mes "I completely agree..."; mes "I might be a great refiner, but sometimes even I make mistakes."; close; } } if((countitem(.@material) < .@materialCount) || (Zeny < .@price)) { mes "["+ .@npc_name$ +"]"; mes "You don't seem to have"; mes "enough Zeny or "+getitemname(.@material)+"..."; mes "Go get some more. I'll be"; mes "here all day if you need me."; close; } Zeny = Zeny-.@price; delitem .@material,.@materialCount; // anti-hack if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3]) || callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt)) { mes "["+ .@npc_name$ +"]"; emotion ET_FRET; mes "Wait a second..."; mes "Do you think I'm stupid?!"; mes "You switched the item while I wasn't looking! Get out of here!"; close; } if(getequippercentrefinery(.@part) <= rand(100)) { failedrefitem .@part; mes "["+ .@npc_name$ +"]"; emotion (!rand(5))?ET_MONEY:ET_HUK; .@lose = rand(1,3); if (.@lose == 1) { mes "OH! MY GOD!"; mes "Damn it! Not again!"; mes "I'm terribly sorry, but you know practice does make perfect."; mes "Um, right? Heh heh..."; } else if(.@lose == 2) { mes "Nooooooo!"; mes "It broke!"; mes "I-I'm sorry!"; } else { mes "Crap!"; mes "It couldn't take"; mes "much more tempering!"; mes "Sorry about this..."; } close; } mes "["+getarg(0)+"]"; successrefitem .@part; emotion ET_SMILE; .@win = rand(1,3); if (.@win == 1) { mes "Perfect!"; mes "Heh heh!"; mes "Once again,"; mes "flawless work"; mes "from the master~"; } else if(.@win == 2) { mes "Success...!"; mes "Yet again, my amazing"; mes "talent truly dazzles"; mes "and shines today."; } else { mes "Heh heh!"; mes "I'm all done."; mes "No doubt, my work is"; mes "to your satisfaction."; mes "Sheer, utter perfection~"; } close; OnInit: serattay .allowed_items,1201, 1202, 1203; end; }
  12. in my opinion , "ragnarok hosting services" is a scam ? (OFC IT'S ONLY MY OPINION) why don't you try to buy a normal vps with the system/ip/protection/specs you want and install rAthena in it using https://github.com/rathena/rathena/wiki ? it would take some work , but again (in my opinion) if you can't setup a server from 0 , don't open one , or look for a partner that can do it in the future you will find bugs/problems in the server , you can't fix it if you don't know the basic just use google and search for a vps with low ping , low price ,1gig ram or more if you want , 10gig storage or more if you want , 1core or more if you want i would suggest Debian 9 2gig ram 2core
  13. i think you already got the answer in discord, however this is the answer if someone wanted it getpartymember getcharid(1),0,.@name$[0]; getpartymember getcharid(1),1,.@charid[0]; getpartymember getcharid(1),2,.@accid[0]; for(.@i=0;.@i<getarraysize(.@name$[0]);.@i++){ if(isloggedin(.@accid[.@i],.@charid[.@i])){ if(.@state = checkvending(.@name$[.@i])){ if (.@state&1) mes .@name$[.@i] + " is currently vending!"; if (.@state&4) mes .@name$[.@i] + " has a buying store!"; if (.@state&2) mes .@name$[.@i] + " is autotrading!"; .@someone_vinding = true; } } } if(.@someone_vinding) end;
  14. if it work , than it's safe maybe they did change the functions in the iteminfo in 2019 clients , i didn't look up the info about 2019 yet
  15. as the topic owner removed his post and the files are not available anymore i am sorry to close this topic i think he did more than enough to resolve any issue happened with the files to the users , so if you still have some issue and you don't want to search for another guide , i suggest looking inside the topic and you will find a solve for it if you are looking for a new guide , you can check rAthena wiki if you had any issue , i suggest you try to use rAthena Search feel free to post any issue you have in one of our support sections
  16. ClassNum = 1882 https://github.com/rathena/rathena/wiki/Custom-Items
  17. try if(compare(strcharinfo(3),"@")){ //inside a map that contain '@' in it's name, normally that's mean instance map!. }
  18. - script GlobalMvP::GlobalMvP -1,{ OnNPCKillEvent: if(inarray(getd(".MVP_" + strcharinfo(3)),killedrid) != -1){ query_sql "SELECT `name` FROM `mvp` WHERE `char_id`="+getcharid(0)+"",.@name$; if ( .@name$ == "" ) { query_sql "INSERT INTO `mvp` (`char_id`,`name`,`kills`,`points`) VALUES (" + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "',1,1)"; end; } query_sql "UPDATE `mvp` SET `kills` = (`kills` + 1), `points` = (`points` +1) WHERE `char_id`=" + getcharid(0); } end; function AddMvP { for(.@i=1;.@i<getargcount();.@i++){ setd ".MVP_" + getarg(0) + "[" + .@i + "]",getarg(.@i); } return; } OnInit: query_sql("CREATE TABLE IF NOT EXISTS `mvp` (`char_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '0', `kills` int(11) unsigned NOT NULL DEFAULT '0',`points` int(11) unsigned NOT NULL DEFAULT '0', `level` int(11) unsigned NOT NULL DEFAULT '0', KEY `char_id` (`char_id`), KEY `kills` (`kills`), KEY `points` (`level`), KEY `level` (`level`)) ENGINE=MyISAM"); freeloop(1); //AddMvP(<"MAP_NAME">,<MVP ID>{,<MVP ID>}); //you can add as much as you want mvp ids AddMvP("prontera",1002); AddMvP("payon",1002,1003,1004); AddMvP("geffen",1546); freeloop(0); end; }
  19. btw , this will only work on monsters without label something like Lord of Death or biolab 3(with their normal spawn), you need to edit the main script to work , you need to find the npc that have it's label , add your codes to that label too
  20. ? - script GlobalMvP::GlobalMvP -1,{ OnNPCKillEvent: if(inarray(.AllowedMaps$,strcharinfo(3)) != -1 && inarray(.MVP_IDS,killedrid) != -1){ query_sql "SELECT `name` FROM `mvp` WHERE `char_id`="+getcharid(0)+"",.@name$; if ( .@name$ == "" ) { query_sql "INSERT INTO `mvp` (`char_id`,`name`,`kills`,`points`) VALUES (" + getcharid(0) + ",'" + escape_sql(strcharinfo(0)) + "',1,1)"; end; } query_sql "UPDATE `mvp` SET `kills` = (`kills` + 1), `points` = (`points` +1) WHERE `char_id`=" + getcharid(0); } end; OnInit: query_sql("CREATE TABLE IF NOT EXISTS `mvp` (`char_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '0', `kills` int(11) unsigned NOT NULL DEFAULT '0',`points` int(11) unsigned NOT NULL DEFAULT '0', `level` int(11) unsigned NOT NULL DEFAULT '0', KEY `char_id` (`char_id`), KEY `kills` (`kills`), KEY `points` (`level`), KEY `level` (`level`)) ENGINE=MyISAM"); setarray .AllowedMaps$,"prontera","map_name";//put the names of the allowed maps. setarray .MVP_IDS, 1511,// Amon Ra 1647,// B_EREMES 1785,// Atroce 1630,// BACSOJIN_ 1039,// Baphomet 1874,// BEELZEBUB_ 1272,// Dark Lord 1719,// Detale 1046,// Doppelganger 1389,// Dracula 1112,// Drake 1115,// Eddga 1957,// Entweihen 1418,// Evil Snake Lord 1871,// FALLINGBISHOP 1252,// Garm 1768,// GLOOMUNDERNIGHT 1086,// Golden Bug 1802,// G_MAGALETA 1649,// High Priest Magaleta 1651,// High Wizard Katryne 1832,// Ifrit 1492,// Incantation Samurai 1734,// Kiel_ 1251,// Stormy Knight 1779,// Ktullanux 1688,// Lady Tanee 1640,// G_SEYREN 1646,// Lord Knight Seyren 1373,// Lord of Death 1147,// Maya 1059,// Mistress 1150,// Moonlight flower 1956,// Naght Seiger 1087,// Orc Hero 1190,// Orc Lord 1038,// Osiris 1157,// Pharaoh 1159,// Phreeoni 1502,// Poripori 1623,// RSX 1650,// Sniper Cecil// Sniper Shecil 1583,// Tao Gunka 1708,// Thanatos 1312,// Turtle General 1765,// Valkyrie 1751,// Valkyrie rangdris 1685,// Vesper 1648,// Whitesmith Howard 1917,// Satan Morroc 1658,// Egnigem Cenia 1885,// Zmey Gorynych 1990,// Hard Rock Mamooth 1991;// Tendrillion end; } Also i don't see why the use of sql i think there is already ready-to-use mvp rank scripts if you use the search , it would be better than building your own.
  21. create an achievement , and add the title to it as a reward use "achievementcomplete(<achievement id>{,<char id>})" now the player have the title
  22. try the mapflag 'pvp_nocalcrank' will disable calculation of PvP rankings.
  23. --------------------------------------- *getitembound <item id>,<amount>,<bound type>{,<account ID>}; *getitembound "<item name>",<amount>,<bound type>{,<account ID>}; This command behaves identically to 'getitem', but the items created will be bound to the target character as specified by the bound type. All items created in this manner cannot be dropped, sold, vended, auctioned, or mailed, and in some cases cannot be traded or stored. Valid bound types are: Bound_Account : Account Bound item Bound_Guild : Guild Bound item Bound_Party : Party Bound item Bound_Char : Character Bound item ---------------------------------------
×
×
  • Create New...