Jump to content

cook1e

Members
  • Posts

    155
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by cook1e

  1. View File PVP on MVP Maps When a MVP Spawns PVP is enabled, When this MVP dies PVP is disabled. New Mapflag MF_MAPMVP - Disable going to savepoint once you die 2 times in a PVP map. Submitter cook1e Submitted 06/20/2022 Category Source Modifications Video Content Author cook1e  
  2. Version 1.0.0

    32 downloads

    When a MVP Spawns PVP is enabled, When this MVP dies PVP is disabled. New Mapflag MF_MAPMVP - Disable going to savepoint once you die 2 times in a PVP map.
    Free
  3. I enabled the mapflag only in prontera and i can't use the token, but i can anywhere else. Everything is working as intended
  4. View File Dungeon of the Day Each day a random dungeon will be picked, monsters killed inside the dungeon of the day will give extra EXP, Items and Zeny, the percentage to get these is configurable within the script. Accepting suggestions to improve this script. Submitter cook1e Submitted 06/19/2022 Category Utilities Video Content Author cook1e  
  5. Version 1.1

    62 downloads

    Each day a random dungeon will be picked, monsters killed inside the dungeon of the day will give extra EXP, Items and Zeny, the percentage to get these is configurable within the script. Accepting suggestions to improve this script.
    Free
  6. Tested and is working as intended, if you want some extra features in it just let me know. - script dotd -1,{ OnInit: .exp_bonus = 10; // change exp % here OnClock0000: // new dungeon of the day will be changed at 00:00 server time setarray .random_maps$,"prontera","pay_dun00"; // add your maps here .map = rand(getarraysize(.random_maps$)); announce "New Dungeon of the Day is '"+.random_maps$[.map]+"' with ["+.exp_bonus+"%] more EXP.",bc_all; end; OnNPCKillEvent: getmapxy([email protected]$,[email protected],[email protected],BL_PC); if([email protected]$ == .random_maps$[.map]) { set BaseExp, BaseExp + (getmonsterinfo(killedrid,3) * .exp_bonus / 100); set JobExp, JobExp + (getmonsterinfo(killedrid,4) * .exp_bonus / 100); } end; OnPCLoginEvent: dispbottom "Dungeon of the Day is '"+.random_maps$[.map]+"' with ["+.exp_bonus+"%] more EXP.",0x00FFFF; end; }
  7. You can make a quest like Elysium said or use this one. new_1-3,100,35,4 script Newbie Guide 418,{ mes "==^741188Equipment Guide^000000=="; mes "Hello welcome to our server,"; mes "i am here to guide all new"; mes "player that have joined our server"; mes "to craft your starting gear"; next; switch(select("- Tell me more:- Craft Beginner Equipment:- Exit")) { case 1: mes "==^741188Equipment Guide^000000=="; mes "As you may or my not knowing"; mes "that equipment will not drop by"; mes "monster, but player can still"; mes "obtain offical equipment from"; mes "merchat class equipment crafting"; mes "or from offical quest"; next; mes "==^741188Equipment Guide^000000=="; mes "This server does not follow"; mes "offical equipment drop"; mes "but each server custom "; mes "equipment will have it's own"; mes "speciality"; end; case 2: mes "==^741188Equipment Guide^000000=="; mes "To craft your starting gear"; mes "which is Beginner Dagger"; mes "firstly i will need you to"; mes "hunt 50 poring, i will reward"; mes "you with 1 Common Blue Print"; mes "Common Blue Print are use to craft"; mes "Common equipment"; next; menu "Take this quest",Acc,"No Thanks",Den; Acc: if(dagger) { mes "You already have this hunting quest."; close; } mes "==^741188Equipment Guide^000000=="; mes "Now please help me hunt 50 poring"; set dagger, 1; end; Den: mes "==^741188Equipment Guide^000000=="; mes "Sure just come back to me when you change your mind"; end; case 3: mes "==^741188Equipment Guide^000000=="; mes "Very well, come to me if you need guide"; close; } end; OnNPCKillEvent: if(!dagger) end; if(killedrid == .mob_id) { poring_count++; dispbottom "You have killed "+poring_count+"/"+.kill_amount+"] "+getmonsterinfo(.mob_id, MOB_NAME)+"."; } if(poring_count >= .kill_amount) { poring_count = 0; for([email protected] = 0; [email protected] < getarraysize(.reward); [email protected] += 2) { getitem .reward[[email protected]],.reward[[email protected]+1]; } } end; OnInit: setarray .reward,501,1,502,1; // add rewards here .mob_id = 1002; // monster id .kill_amount = 50; // amount of porings needed end; }
  8. You can't just add a clean clif.cpp without knowing your rathena git hash (emulator date)
  9. If you don't use the Roulette button, you can use the roulette as the config button, you can also change the roulette icon in your grf. go to src/map/clif.cpp Change void clif_roulette_open( struct map_session_data* sd ){ nullpo_retv( sd ); struct packet_roulette_open_ack p; p.PacketType = 0xa1a; p.Result = 0; // result p.Serial = 0; // serial p.Step = (sd->roulette.claimPrize) ? sd->roulette.stage - 1 : 0; p.Idx = (sd->roulette.claimPrize) ? sd->roulette.prizeIdx : -1; p.AdditionItemID = -1; //! TODO: Display bonus item p.GoldPoint = sd->roulette_point.gold; p.SilverPoint = sd->roulette_point.silver; p.BronzePoint = sd->roulette_point.bronze; sd->state.roulette_open = true; clif_send( &p, sizeof( p ), &sd->bl, SELF ); } to void clif_roulette_open( struct map_session_data* sd ){ nullpo_retv( sd ); npc_event_do_id("NPCNAME::OnLabel", sd->status.account_id); } and make a script like this, for example. - script NPCNAME -1,{ OnLabel: mes "add whatever you want."; end; }
  10. This? - script remove#var -1,{ OnPCLogoutEvent: if(lastwarp$ != "") lastwarp$ = ""; if(lastwarpx != 0) lastwarpx = 0; if(lastwarpy != 0) lastwarpy = 0; end; }
  11. Run server in GDB till the server crashes and upload the output here. https://github.com/rathena/rathena/wiki/GDB
  12. - script test -1,{ OnPCKillEvent: //if ( ( !getmapflag( strcharinfo(3), mf_pvp ) && !getmapflag( strcharinfo(3), mf_gvg ) ) || killedrid == getcharid(3) ) end; if ( getmapflag( strcharinfo(3), mf_pvp ) == 0 || killedrid == getcharid(3) ) end; attachrid killedrid; [email protected] = getcharid(0); attachrid killerrid; if(getcharip(killedrid) == getcharip(getcharid(3))) end; getitem2 8966, 1,1,0,0, 254, 0, [email protected] % pow(2,16), [email protected] / pow(2,16); // getnameditem 7420, rid2name( killedrid ); // <-- EDITED, this command doesn't drop item on floor end; }
  13. cook1e

    PVP Points

    - script PVPPOINTS -1,{ OnPCKillEvent: [email protected]$,[email protected],[email protected],BL_PC; if(getcharid(3)==killedrid) end; if([email protected]$ != "pvp_y_1-2") end; set [email protected], getcharid(3); set [email protected], killedrid; if(getcharip([email protected]) == getcharip([email protected])) end; attachrid([email protected]); set [email protected], #PVPCPOINTS; if([email protected]) { set #PVPCPOINTS, #PVPCPOINTS -1; dispbottom "You Lost 1 PvP Point from "+rid2name(killerrid); dispbottom "You have total of "+#PVPCPOINTS+" Pvp Points"; } attachrid([email protected]); if([email protected]) { dispbottom "Sorry no PvP points on the "+rid2name(killedrid); } else set #PVPCPOINTS, #PVPCPOINTS +1; dispbottom "You Gained 1 PvP Point from "+rid2name(killedrid); dispbottom "You have total of "+#PVPCPOINTS+" Pvp Points"; end; }
  14. cook1e

    PVP Points

    Add this in your script and check if it works. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L2557 if(getcharip([email protected]) == getcharip([email protected])) end;
  15. In your grf find bookitemnametable.txt add book id. ID# for example The new book id is 11065 add 11065# in bookitemnametable.txt then create in your grf data/book/11065.txt and add your book info in this new .txt
  16. Try this. 1. go to src/map/map.hpp and find MF_MAX above add this MF_NOTOKEN, 2. go to src/map/script_constant.hpp and find export_constant(MF_SKILL_DURATION); below add this export_constant(MF_NOTOKEN); 3. go to src/map/pc.cpp and find bool pc_revive_item(struct map_session_data *sd) { nullpo_retr(false, sd); if (!pc_isdead(sd) || sd->respawn_tid != INVALID_TIMER) return false; if (sd->sc.data[SC_HELLPOWER]) // Cannot resurrect while under the effect of SC_HELLPOWER. return false; int16 item_position = itemdb_group_item_exists_pc(sd, IG_TOKEN_OF_SIEGFRIED); uint8 hp = 100, sp = 100; if (item_position < 0) { if (sd->sc.data[SC_LIGHT_OF_REGENE]) { hp = sd->sc.data[SC_LIGHT_OF_REGENE]->val2; sp = 0; } else return false; } if (!status_revive(&sd->bl, hp, sp)) return false; if (item_position < 0) status_change_end(&sd->bl, SC_LIGHT_OF_REGENE, INVALID_TIMER); else pc_delitem(sd, item_position, 1, 0, 1, LOG_TYPE_CONSUME); clif_skill_nodamage(&sd->bl, &sd->bl, ALL_RESURRECTION, 4, 1); return true; } and change to bool pc_revive_item(struct map_session_data *sd) { nullpo_retr(false, sd); int16 m = 0; struct map_data *mapdata = map_getmapdata(m); if (!pc_isdead(sd) || sd->respawn_tid != INVALID_TIMER) return false; if (sd->sc.data[SC_HELLPOWER]) // Cannot resurrect while under the effect of SC_HELLPOWER. return false; if(map_getmapflag(sd->bl.m, MF_NOTOKEN)) return false; int16 item_position = itemdb_group_item_exists_pc(sd, IG_TOKEN_OF_SIEGFRIED); uint8 hp = 100, sp = 100; if (item_position < 0) { if (sd->sc.data[SC_LIGHT_OF_REGENE]) { hp = sd->sc.data[SC_LIGHT_OF_REGENE]->val2; sp = 0; } else return false; } if (!status_revive(&sd->bl, hp, sp)) return false; if (item_position < 0) status_change_end(&sd->bl, SC_LIGHT_OF_REGENE, INVALID_TIMER); else pc_delitem(sd, item_position, 1, 0, 1, LOG_TYPE_CONSUME); clif_skill_nodamage(&sd->bl, &sd->bl, ALL_RESURRECTION, 4, 1); return true; } Not tested, let me know if it works.
  17. I think you need to enable this for pet bonus to work. https://github.com/rathena/rathena/blob/master/conf/battle/pet.conf#L58
  18. That part should be added on map.cpp. https://github.com/Normynator/roCORD/blob/master/diff/rev2/map.diff Also Normynator said he don't support roCORD anymore, so don't expect help.
  19. Un ejemplo para hacer un item Shadow. - Id: 2368 AegisName: Golden_Armor Name: Golden Armor Type: ShadowGear Buy: 20 Weight: 2000 Defense: 4 Locations: Shadow_Armor: true Trade: Override: 100 NoDrop: true NoTrade: true NoCart: true NoGuildStorage: true NoMail: true NoAuction: true Script: | bonus bMdef,4; Tambien puedes chequear este enlace, para más información. https://github.com/rathena/rathena/blob/master/doc/item_db.txt
  20. That is a function also created by @Stolao https://github.com/Stolao/Npc_Release/tree/master/Custom_Functions
  21. //===== rAthena Script ======================================= //= Disguise Event //===== By: ================================================== //= GmOcean //===== Current Version: ===================================== //= 5.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Guess a monster name correctly for prizes. //= //= NOTE: Requires PCRE library installed. //===== Additional Comments: ================================= //= 5.0 Last update by GmOcean. //= 5.1 Cleaned and standardized, mostly. [Euphy] //============================================================ skycity,184,210,4 script Disguise Event 795,{ // Currently set to run every two hours. // To change times, edit the OnClock labels below. set [email protected],60; // GM level required to access NPC. set [email protected]$,"[^0000FFDisguise NPC^000000]"; if (getgmlevel()>[email protected]) { mes [email protected]$; mes "Select an option."; next; switch(select("Turn ON/OFF Event:Event Settings")) { case 1: mes [email protected]$; if (.EventON) { mes "The Event is currently: [^0000FFON^000000]"; mes "Would you like to turn it OFF?"; } else { mes "The Event is currently: [^FF0000OFF^000000]"; mes "Would you like to turn it ON?"; } if(select("Yes:No")==2) close; if (.EventON) { set .EventON,0; set .Timer,0; setnpctimer 0; stopnpctimer; announce "A GM has decided to turn the Disguise Event off. As a result no further prizes will be given.",bc_map | bc_blue; // deletepset 1; setnpcdisplay "Disguise Event",795; close; } set .EventON,1; set .Timer,1; setnpctimer 0; initnpctimer; set .ResetCounter,.ResetCounter+1; announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue; announce "The Event is being held in Sky City (skycity 184 210).",bc_all | bc_blue; close; case 2: mes [email protected]$; mes "Pick a setting to modify."; next; switch(select("Monster Display:Number of Rounds:Prize Settings")) { case 1: setarray [email protected]$[0],"Disguise as all monsters.","Disguise as MVPs only."; mes [email protected]$; mes "Choose a disguise rule."; next; set .Rule, select(implode([email protected]$,":")); mes [email protected]$; mes "The Disguise Rule has been set:"; mes " > ^0055FF"[email protected]$[.Rule-1]+"^000000"; close; case 2: mes [email protected]$; mes "Input the number of rounds you want the event to last."; mes "Current number: [^0000FF"+.Rounds+"^000000]"; next; input [email protected]; set .Rounds,[email protected]; mes [email protected]$; mes "The number of rounds has been changed to "+.Rounds+"."; close; case 3: mes [email protected]$; mes "Input the Item ID of the prize given each round."; mes "Current item: [^0000FF"+getitemname(.Prize)+"^000000] (ID #"+.Prize+")"; next; input [email protected]; mes [email protected]$; if (getitemname([email protected])=="" || getitemname([email protected])=="null") { mes "That item does not exist. Please try again."; close; } set .Prize,[email protected]; mes "Input the amount to be given."; next; input [email protected]; mes [email protected]$; if ([email protected]<=0 || [email protected]>=10000) { mes "That amount is invalid. Using default amount of 1."; set [email protected],1; next; mes [email protected]$; } set .PrizeAmt,[email protected]; mes "The Prize has been changed successfully."; mes "Prize: "+.PrizeAmt+"x [^0000FF"+getitemname(.Prize)+"^000000]"; close; } } } if (.EventON) end; mes [email protected]$; mes "Welcome."; mes "How may I be of assistance?"; if(select("Information:Nothing, just passing through.")==2) close; next; mes [email protected]$; mes "This event is quite simple."; mes "At the start of the event, I will"; mes "disguise myself as a random"; mes "monster. You have to shout"; mes "that monster's name out loud."; next; mes "If you are correct, you will receive"; mes "a prize. If not, keep trying!"; mes "That's all that there is to this event."; close; OnInit: set .EventON,0; set .Wait,0; set .Winner,0; set .ResetCounter,0; set .Rounds,10; setarray .prize,7539,3,35405,1; set .Rule,1; setarray .MVP[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373, 1389,1399,1418,1492,1502,1511,1583,1623,1630,1646,1647,1648,1649,1650,1651,1658,1685,1688, 1708,1719,1734,1751,1768,1779,1785,1802,1832,1871,1874,1885,1917,1980,2022,2068,2087,2131, 2156,2165; set .BlackList$, "1003,1006,1017,1021,1022,1027,1043,1075,1136,1137,1168," + "1171,1172,1173,1181,1187,1210,1217,1218,1222,1223,1224,1225,1226,1227,1228," + "1233,1284,1407,1411,1414,1495,1501,1900,1996,2000,2001,2002,2003,2004," + "2005,2006,2007,2011,2012,2025,2028,2029,2030,2031,2032,2033,2034,2035," + "2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049," + "2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063," + "2064,2065,2066,2067,2075,2076,2077,2078,2079,2080,2081,2083,2084,2085," + "2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099," + "2100,2101,2012,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113," + "2114,2115,2116,2117,2118,2119,2120,2121,2123,2124,2125,1496,"; end; OnMinute40: set .ResetCounter,.ResetCounter+1; set .EventON,1; set .Timer,1; set .Wait,1; announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue; announce "The Event is being held in Sky City (skycity 184 210).",bc_all | bc_blue; setnpctimer 0; initnpctimer; end; OnTimer10000: if (.Timer || .Change) end; set .Wait,0; goto iDisguise; end; OnTimer30000: if (.Timer) end; set .Change,0; setnpcdisplay "Disguise Event",795; npctalk "Disguise Event : You took too long to guess what I was. Please wait 10 seconds while I disguise again."; specialeffect EF_DETECT2; set $MonsterName$,""; // deletepset 1; stopnpctimer; setnpctimer 0; set .RoundCount,.RoundCount+1; if (.RoundCount>=.Rounds) { setnpcdisplay "Disguise Event",795; set .RoundCount,0; set .Change,0; set .EventON,0; setnpctimer 0; stopnpctimer; npctalk "Disguise Event : Thank you all for playing. That was the last round of the Disguise Event. Come play again later."; end; } initnpctimer; end; OnTimer60000: if (.Timer!=1) end; announce "The Disguise Event will begin in 2 minutes.",bc_all | bc_blue; announce "The Event is being held in Sky City (skycity 184 210).",bc_all | bc_blue; end; OnTimer120000: if (.Timer!=1) end; announce "The Disguise Event will begin 1 minute.",bc_all | bc_blue; announce "The Event is being held in Sky City (skycity 184 210).",bc_all | bc_blue; end; OnTimer180000: if (.Timer!=1) end; announce "The Disguise Event has begun!",bc_all | bc_blue; announce "The Event is being held in Sky City (skycity 184 210).",bc_all | bc_blue; set .Timer,0; stopnpctimer; setnpctimer 0; initnpctimer; iDisguise: if (.Rule==1) { set .Winner,0; set .Monster,1000+rand(1,995); if (compare(","+.BlackList$+"," , ","+.Monster+",")) goto iDisguise; if (.Monster==.LastMonster) goto iDisguise; set .LastMonster,.Monster; set $MonsterName$,getmonsterinfo(.Monster,0); } if (.Rule==2) { set .Winner,0; set .Monster,rand(49); set $MonsterName$,getmonsterinfo(.MVP[.Monster],0); } // deletepset 1; defpattern 1,"([^:]+):.\\s*"+$MonsterName$+".*", "iCorrect"; activatepset 1; if (.Rule==1) setnpcdisplay "Disguise Event",.Monster; if (.Rule==2) setnpcdisplay "Disguise Event",.MVP[.Monster]; set .Change,1; setnpctimer 0; end; iCorrect: if (.Winner) { dispbottom "Someone has already won this round."; end; } set .Winner,1; set .RoundCount,.RoundCount+1; // deletepset 1; activatepset 1; for([email protected] = 0; [email protected] < getarraysize(.prize); [email protected] += 2) { getitem .prize[[email protected]],.prize[[email protected]+1]; } announce strcharinfo(0)+" is correct! I was disguised as: "+$MonsterName$+"",bc_map | bc_blue; if (.RoundCount>=.Rounds) { setnpcdisplay "Disguise Event",795; set .RoundCount,0; set .Change,0; set .EventON,0; setnpctimer 0; stopnpctimer; npctalk "Disguise Event : Thank you all for playing. That was the last round of the Disguise Event. Come play again later."; end; } setnpcdisplay "Disguise Event",795; set .Change,0; setnpctimer 0; end; } I did a little optimization for you. setarray .prize,7539,3,35405,1; give item part for([email protected] = 0; [email protected] < getarraysize(.prize); [email protected] += 2) { getitem .prize[[email protected]],.prize[[email protected]+1]; }
  22. Clone the skill Teleport or simply add this script to Creamy Card itemheal 0,-50; Teleport SP 10 + 50 of itemheal = 60.
  23. With multiple currencies you mean this? - Name: shop_sp_cor Items: - Index: 0 Item: Teleport_Ep17_01 RequiredItems: - Index: 0 Item: EP17_1_EVT02 Amount: 1 - Index: 1 Item: Hat_ Amount: 1 Refine: 7 - Index: 2 Item: Dagger_ Amount: 1 Refine: 10 - Index: 3 Item: Jellopy Amount: 100 To buy the Item Teleport_Ep17_01 you will need the following. 1x EP17_1_EV02 1x Hat[1] +7 1x Dagger[3] +10 100x Jellopy I'm sorry but i can't send you a screenshot since i don't have Visual Studio SDK 10 at the moment to compile the latest rAthena.
  24. Barter Shop commit: https://github.com/rathena/rathena/commit/e40da669ed8bb3f06a503e954be51c726a249c33 Examples of how to use Barter Shop: https://github.com/rathena/rathena/blob/master/npc/re/merchants/barters/quests_17_1.yml his file is a part of rAthena. # Copyright(C) 2022 rAthena Development Team # https://rathena.org - https://github.com/rathena # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # ########################################################################### # Barter Database ########################################################################### # # Barter Settings # ########################################################################### # - Name NPC name. # Map Map name. (Default: not on a map) # X Map x coordinate. (Default: 0) # Y Map y coordinate. (Default: 0) # Direction Direction the NPC is looking. (Default: North) # Sprite Sprite name of the NPC. (Default: FakeNpc) # Items: List of sold items. # - Index Index of the item inside the shop. (0-...) # Maximum index depends on client. # Item Aegis name of the item. # Stock Amount of item in stock. 0 means unlimited. (Default: 0) # Zeny Cost of them item in Zeny. (Default: 0) # RequiredItems: List of required items (Optional) # - Index Index of the required item. (0-4) # Item Aegis name of required item. # Amount Amount of required item. (Default: 1) # Refine Refine level of required item. (Default: 0) ###########################################################################
×
×
  • Create New...

Important Information

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