Jump to content

sader1992

Content Moderator
  • Posts

    1678
  • Joined

  • Last visited

  • Days Won

    72

Everything posted by sader1992

  1. 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; }
  2. 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
  3. 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;
  4. 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
  5. 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
  6. ClassNum = 1882 https://github.com/rathena/rathena/wiki/Custom-Items
  7. try if(compare(strcharinfo(3),"@")){ //inside a map that contain '@' in it's name, normally that's mean instance map!. }
  8. - 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; }
  9. 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
  10. ? - 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.
  11. create an achievement , and add the title to it as a reward use "achievementcomplete(<achievement id>{,<char id>})" now the player have the title
  12. try the mapflag 'pvp_nocalcrank' will disable calculation of PvP rankings.
  13. --------------------------------------- *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 ---------------------------------------
  14. izlude,144,121,3 script JohnDoe NPC::JohnDoe 1_M_MERCHANT,{ mes "[JohnDoe]"; mes "Do you need some Novice Potions?"; switch(select("Yes, please.:I don't need them for now, thank you.")){ clear; case 1: .@TIME$ = "" + gettime(DT_YYYYMMDD); if(#JOHNDOE_DAILY$ == .@TIME$){ mes "you already got the Novice Potions for today"; mes "try again in the next day"; end; } mes "Here, take these."; getitem 569,250; #JOHNDOE_DAILY$ = .@TIME$; mes "Good luck!."; end; case 2: mes "Okay, good luck!"; end; } }
  15. it's better you do it in the src , script base wont be as efficient. if you want , i can move the topic to the Source Support Section.
  16. the script is a Disaster what the point of the script ? what the point of the hunger, thirst, sleep how the player gain or loss them ?
  17. the error said it all you can't delete a quest from the player if the player doesn't have it in the first place you can't give a quest to the player if the player already have it
  18. View File Sader Attendance Requirement this patch make the player must have a variable true to claim his attendance reward the variable is #Attendance_YYYYMMDD ofc the variable change each day this will allow you to create a script to make for example a quest that the player must do every day to claim the attendance like for example the player must kill 500 monster before he can claim his attendance or must gather items or must be x level or must player x amount of time in the day so he can claim the reward of all the above the file include an information script file that have 2 function , one to set the variable and one to get the variable value (if you want to use them , just add them to your rathena/npc/other/Global_Functions.txt) it also include 2 example quests for you to get some inspiration to create your own script TODO: create function for gepard Submitter sader1992 Submitted 07/27/2019 Category Source Modifications Video Content Author sader1992  
  19. Version 1.0.0

    591 downloads

    this patch make the player must have a variable true to claim his attendance reward the variable is #Attendance_YYYYMMDD ofc the variable change each day this will allow you to create a script to make for example a quest that the player must do every day to claim the attendance like for example the player must kill 500 monster before he can claim his attendance or must gather items or must be x level or must player x amount of time in the day so he can claim the reward of all the above the file include an information script file that have 2 function , one to set the variable and one to get the variable value (if you want to use them , just add them to your rathena/npc/other/Global_Functions.txt) it also include 2 example quests for you to get some inspiration to create your own script TODO: create function for gepard
    Free
  20. i didn't understand what you are saying this will warp a random player from the given map to "prontera",155,150 .@s = getmapunits(BL_PC,"map_name",.@names$); warp "prontera",155,150,getcharid(0,.@names$[rand(.@s)]);
  21. any error/warning in the console ?
  22. try this 62068,Sporing,SPoring,1,0,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ progressbar "0x00FF00",1; if(mobcount(strcharinfo(3),"Summon_NPC::OnSummon")) { killmonster strcharinfo(3),"Summon_NPC::OnSummon"; } else { summon "Slave Poring",26127,100*60000,"Summon_NPC::OnSummon"; } },{},{} - script Summon_NPC -1,{ OnInit: set .Map$,"prt_fild01"; setmapflag .Map$,mf_loadevent; end; OnPCLoadMapEvent: if(strcharinfo(3) == .Map$ && mobcount( .Map$,"Summon_NPC::OnSummon") == 1 ){ killmonster.Map$,"Summon_NPC::OnSummon"; } end; OnSummon: end; }
  23. you can't turn everything to the grf except the data folder the system folder or the lua files like iteminfo etc wont work with that , as the exe read them first before the grf ofc if your question only about the data folder , it's better to not leave any file inside the data folder and straight up ignoring the data folder so no edit will be done to the game files without editing the grf and with hard coding the grf names and removing the data.ini /encrypt your grf it's slightly better security for your client files. a security for your client files to not be easy to edit by everyone but there still some technicians to edit them anyway , but not everyone would thing about it if you want more security than you would need something like Gepard
×
×
  • Create New...