Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/14/20 in Posts

  1. //===== rAthena Script ======================================= //= Ticket Refiner //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= [Official Conversion] //= Refiner that uses +5~9/+11 refine tickets to refine //= equipment with no chance of failure. //= NOTE: This NPC is currently disabled on official servers. //===== Additional Comments: ================================= //= 1.0 First version. [Euphy] //= 1.1 Do not refine above ticket level. [Euphy] //============================================================ // Main NPC :: safety_Ref_NPC //============================================================ prontera,184,177,6 script Refine Master 851,{ disable_items; if (countitem(6238) || countitem(6228) || countitem(6229) || countitem(6230) || countitem(6231) || countitem(6456)) set .@bWeaponUp,1; if (countitem(6239) || countitem(6232) || countitem(6233) || countitem(6234) || countitem(6235) || countitem(6457)) set .@bArmorUp,1; if (!.@bWeaponUp && !.@bArmorUp) { mes "[Refine Master]"; mes "Hello!"; mes "What's up?"; mes "I'm a specialist"; mes "for refining items,"; mes "but I don't work anymore."; next; switch(select("I'll go on my way.:Hmm... this makes me curious.")) { case 1: mes "[Refine Master]"; mes "Take care, adventurer."; close; case 2: mes "[Refine Master]"; mes "Actully, I sometimes provide refine services for adventurers with a ^006400Refine Ticket^000000..."; mes "Bye bye~!"; close; } } emotion ET_SURPRISE; mes "[Refine Master]"; mes "Greetings!"; mes "I can refine an item up to the ^006400same level as your ticket^000000."; mes "You don't have to worry! There's no chance of breaking your item."; next; if(select("I'll come back later.:Refine item with ticket.") == 1) { mes "[Refine Master]"; mes "Okay."; mes "You can come again later."; close; } mes "[Refine Master]"; mes "Which equipment would you like to refine?"; next; setarray .@position$[1],"Head upper","Armor","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head middle","Head lower"; 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(set .@i,1; .@i<=10; set .@i,.@i+1) set .@menu$, .@menu$+((getequipisequiped(.@indices[.@i]))?getequipname(.@indices[.@i]):.@position$[.@i]+"- [Empty]")+":"; set .@part, .@indices[ select(.@menu$) ]; if (!getequipisequiped(.@part)) { mes "[Refine Master]"; mes "You have to equip the item you want to refine."; close; } if (!getequipisenableref(.@part)) { emotion ET_OTL; mes "[Refine Master]"; mes "Oh, I'm sorry."; mes "This item is impossible to refine."; 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); switch(getequipweaponlv(.@part)) { default: case 0: setarray .@tickets[0],6457,6235,6234,6233,6232,6239; setarray .@levels[0],5,6,7,8,9,11; set .@type$,"Armor"; set .@check,.@bArmorUp; break; case 1: case 2: case 3: case 4: setarray .@tickets[0],6456,6231,6230,6229,6228,6238; setarray .@levels[0],5,6,7,8,9,11; set .@type$,"Weapon"; set .@check,.@bWeaponUp; break; } if (!.@check) { emotion ET_THINK; mes "[Refine Master]"; mes "If you want to refine this ^006400"+.@type$+"^000000, please come along with ^006400"+.@type$+" Refine Ticket^000000."; mes "See you later!"; close; } mes "[Refine Master]"; mes "Please choose which ^006400"+.@type$+" Refine Ticket^000000 you want to use."; next; set .@menu$,""; for(set .@i,0; .@i<getarraysize(.@tickets); set .@i,.@i+1) set .@menu$, .@menu$+getitemname(.@tickets[.@i])+":"; set .@select, select(.@menu$)-1; set .@ticket_lv, .@levels[.@select]; set .@ticket_id, .@tickets[.@select]; if (countitem(.@ticket_id) == 0) { emotion ET_QUESTION; mes "[Refine Master]"; mes getitemname(.@ticket_id)+" is not in your inventory. Did you put it in your storage?"; mes "Please check again."; mes "See you later!"; close; } if (getequiprefinerycnt(.@part) >= .@ticket_lv) { emotion ET_PROFUSELY_SWEAT; mes "[Refine Master]"; mes "^8B4513This item is already refined as much as your deed.^000000"; mes "Please come along with an item refined less than your ticket."; close; } mes "[Refine Master]"; mes "I'm going to refine ^006400"+getequipname(.@part)+"^8B4513 up to the +"+.@ticket_lv+" level^000000 with ^006400"+getitemname(.@ticket_id)+"^000000."; mes "May I proceed?"; next; if(select("No.:Yes.") == 1) { emotion ET_THINK; mes "[Refine Master]"; mes "Oh, you changed your mind."; mes "Ok."; mes "You can come back later."; close; } mes "[Refine Master]"; mes "Great."; mes "As you wish!"; mes "I have my own special way to refine..."; mes ".......ka boom!"; if (countitem(.@ticket_id)) { delitem .@ticket_id,1; // anti-hack if (callfunc("F_IsEquipIDHack", .@part, .@refineitemid) || callfunc("F_IsEquipRefineHack", .@part, .@refinerycnt) || callfunc("F_IsEquipCardHack", .@part, .@card[0], .@card[1], .@card[2], .@card[3])) { mes "[Refine Master]"; 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; } } else { next; mes "Error!"; mes "Please report this."; close; } set .value, rand(0,100); if(.value >= 98){ specialeffect EF_SUI_EXPLOSION; successrefitem .@part, .@ticket_lv - getequiprefinerycnt(.@part); }else{ mes "Refinement failed, ticket was consuming. Try again."; } next; emotion ET_DELIGHT; mes "[Refine Master]"; mes "Alright, here it is~"; mes "Well, ^0000FF"+strcharinfo(0)+"^000000!"; mes "Congratulations on your shining "+.@type$+"."; mes "You look GREAT!"; mes "Farewell~!"; close; } It's like 2% success, you'll see it will fail! Just edit the value down there again to correct it for 40 .. I changed the effect of success for when it succeeds, I have no way to test or refine the code now, because I'm in the company ...
    1 point
  2. It seems like you don't have or aren't loading Global_Functions.txt (https://raw.githubusercontent.com/rathena/rathena/master/npc/other/Global_Functions.txt) You can delete the line in add_event, and also the Event_DevilSquare script.
    1 point
  3. - script disablebuff -1,{ OnPCLoadMapEvent: getmapxy @map$,@x,@y,0; if (@map$ == "guild_vs1" || @map$ == "guild_vs2") { sc_end SC_KAHU_ENTEN; sc_end SC_HYOUHU_HUBUKI; sc_end SC_KAZEHU_SEIRAN; sc_end SC_DOHU_KOUKAI; } } guild_vs1 mapflag loadevent guild_vs2 mapflag loadevent try this one.
    1 point
  4. you dont use commands outside a script.. you use it like this - script control -1,{ OnMon1246: enablenpc "npc"; end; OnMon1247: disablenpc "npc"; end; } prontera,153,181,4 script npc 94,{ npctalk "Hello There"; end; OnInit: disablenpc strnpcinfo(0); end; } but i prefer to use the command gettime() for days which is much more flexible since OnDay command only works at the given time.. Sample: prontera,153,181,4 script npc 94,{ npctalk "Hello There"; end; } - script control -1,{ OnInit: OnHour00: if(gettime(DT_DAYOFWEEK)==MONDAY) enablenpc "npc"; else disablenpc "npc"; end; } As you can see here. whenever the server/script loads again. it will check if the npc should show or hide.. not like the OnDay, it only triggers on certain time.
    1 point
  5. so to be perfectly clear you want the buff to presist when you change shields, but if you totally unequip a shield remove the buff? simple
    1 point
  6. It's working fine thanks for everything @Litro Endemic @Mabuhay
    1 point
  7. Here is my solution. All thanks to @Litro Endemic for the idea.. goto pc.cpp look for /*========================================== * Invoked once after the char/account/account2 registry variables are received. [Skotlex] * We didn't receive item information at this point so DO NOT attempt to do item operations here. * See intif_parse_StorageReceived() for item operations [lighta] *------------------------------------------*/ void pc_reg_received(struct map_session_data *sd) Add this : // Cash shop sd->cashPoints = pc_readaccountreg(sd, add_str(CASHPOINT_VAR)); sd->kafraPoints = pc_readaccountreg(sd, add_str(KAFRAPOINT_VAR)); + if ( pc_readaccountreg(sd, add_str("#BLOCKPASS")) ) + sd->state.protection_acc = 1; + else + sd->state.protection_acc = 0; Dont include + compile and done.
    1 point
  8. it's was showed there "its trying to read what isn't there", well untested code, you can try this one, untested too, but should be ok in : src/map/pc.cpp bool pc_authok(struct map_session_data *sd, uint32 login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) find: // Request all registries (auth is considered completed whence they arrive) intif_request_registry(sd,7); return true; its where the registry loaded, so after this you can take the state of acc protect from registry change: // Request all registries (auth is considered completed whence they arrive) intif_request_registry(sd,7); if( pc_readaccountreg(sd, add_str("#BLOCKPASS")) > 0 ) sd->state.protection_acc = 1; return true;
    1 point
  9. you need to save the value of protection_acc on somewhere (mysql?) so you didn't lost it when log off or changing character. on pc.cpp void pc_setnewpc(struct map_session_data *sd, uint32 account_id, uint32 char_id, int login_id1, t_tick client_tick, int sex, int fd) { add if( pc_readaccountreg(sd, add_str("#BLOCKPASS")) > 0 ) sd->state.protection_acc = 1; after //Required to prevent homunculus copuing a base speed of 0. sd->battle_status.speed = sd->base_status.speed = DEFAULT_WALK_SPEED; untested...
    1 point
  10. I didn't use nemo.herc.ws because they don't have the RE version listed in their downloads page, meaning they don't have a copy. I found two locations with a download for 2018-06-21a: https://drive.google.com/file/d/16VhFbvirHAmiQbiUde7oLE1XPcu1DSsi/view https://mega.nz/#!Zcdk2C4L!z9SkS36VGhJWAaxD9cRf1sVhgC9I6gMm0k6Cld-lYOQ I also found a link for 2018-06-20e from this discussion: After recompiling the 2018-06-21a client is working. I am checking to see how the wrong version got used, but I believe my issue is resolved. Thank you for your help. Edit: Confirmed, my mistake was in the docker-compose syntax; it provides environment variables that get passed, but only to the running container, not to a build. As a result it was using the old default in the Dockerfile that I had not updated. To correct it I had to add ARG properties and shift the parameter in the docker-compose file. Mostly adding this for self reflection.
    1 point
  11. Here is it, just for giving you and idea you can change map, gold point cost and exchange items your self. //===== rAthena Script ======================================================= //= Gold ROOM //===== By: ================================================================== //= Script: naLizn+ //===== Current Version: ===================================================== //= 1.0 //===== Compatible With: ===================================================== //= eAthena, rAthena //===== Description: ========================================================= //=1 > if players enter the gold room the players need to pay 100k of zeny //=2 > pvp is on inside the gold room //=3 > if players died inside the gold room there points will be gone //=4 > each monster you kill inside the gold room players earned a random gold Points //=5 > they can exchange there gold point to items listed on the npc //=6 > skill is off also using fly wings and butterfly wings //=7 > there will be an npc at the center of the map to exit the gold room //===== Contact me =========================================================== //= https://discordapp.com/channels/243351250077220864/243351250077220864 ==== //============================================================================ - script GoldRoom_init -1,{ onInit: set $@BattleMap$, "pvp_n_3-2"; set $@maxMemberCount, 10; set $@EntryPrice, 100000; setarray $@Ch_itemID[0],5597,5596,18746,18712; //item for exchange setarray $@Ch_Cost[0],200,200,500,500; //Excange cost setarray .mapflag, mf_nodrop,mf_nomemo, mf_noteleport, mf_nosave, mf_nobranch, mf_nowarp, mf_nowarpto, mf_noreturn, mf_noskill; .size = getarraysize( .mapflag ); for ( .@i = 0; .@i < .size; .@i++ ){ setmapflag $@BattleMap$, .mapflag[.@i]; } pvpon $@BattleMap$; end; } pvp_n_3-2,99,135,5 script Gold Room Warper#pvp 920,{ mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "You have: ^FF0000"+$GPOINTS+"^000000"; mes "Do you want to return to town?"; if(select("Yes,please","No,Give me more time")==2) { mes "OK, take care then"; close; } set #GOLDPOINT, #GOLDPOINT+$GPOINTS; warp "SavePoint",0,0; end; OnNPCKillEvent: if (killedrid == 1979){ set $GPOINTS,$GPOINTS+rand(0,5); } if (killedrid == 1977 || killedrid == 1976){ set $GPOINTS,$GPOINTS+rand(0,1); } end; } prontera,164,174,3 script Gold Room Warper#prt 920,{ mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "Hey!! Wanna be rich?"; mes "I can bring you to the secert room"; mes "that you can get a lot of GoldPoint there."; next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "However many people in this room seem crezy so you have to take care your self."; mes "Because they can kill you any time and if you die in there"; mes "you will get nothing."; next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "I can birng you there but it not for free."; mes "You need to pay me for ^FF0000"+$@EntryPrice+"^000000 zeny"; next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "What do you need to do?"; menu "Bring me there",L_Goldroom,"Change Gold Point",L_ChangeGift,"Cancel",L_Cancel; L_Cancel: mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "OK, Bye~~"; close; L_Goldroom: if(.@Member>=$@maxMemberCount){ next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "Sorry, map is full now."; mes "please wait a moment then talk to me again."; close; } else { if(Zeny < $@EntryPrice) { next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "Sorry, you don't have enough zeny"; mes "please come back to me again when you ready."; close; } next; set Zeny, Zeny-$@EntryPrice; set .@Member, .@Member+1; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "OK,Now get your money ^FF0000"+$@EntryPrice+"^000000 zeny"; mes "Let's go~~"; next; set $GPOINTS, 0; warp $@BattleMap$, 0, 0; end; } L_ChangeGift: next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "You have: ^FF0000"+#GOLDPOINT+"^000000"; mes "Here is the list of avliable item for changing"; .size = getarraysize( $@Ch_itemID ); for ( .@i = 0; .@i < .size; .@i++ ){ set .@menu$,.@menu$+" ~"+getitemname($@Ch_itemID[.@i])+":"; } set .@menu$, .@menu$+" ~Cancel"; set .@items, select(.@menu$)-1; if(.@items ==(.size)){ next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "No worry~~"; close; } next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "You have selected ^FF0000"+getitemname($@Ch_itemID[.@items])+"^000000"; mes "This need ^FF0000"+($@Ch_Cost[.@items])+" GOLD POINTs^000000"; mes "Do you want to change?"; if(select("No:^FF0000Yes^000000")==1){ next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "OK,no problem"; close; } if(#GOLDPOINT<$@Ch_Cost[.@items]){ next; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "You do not have enough GOLD POINTs"; mes "Please go to get more."; close; } else { next; set #GOLDPOINT,#GOLDPOINT-($@Ch_Cost[.@items]); getitem $@Ch_itemID[.@items],1; mes "^FF7DFF[ Gold Room Warper ]^000000"; mes "You got it, Thanks"; } close; } pvp_n_3-2,0,0 monster Zakudam 1979,20 pvp_n_3-2,0,0 monster Heavy Metaling 1977,10,5000 pvp_n_3-2,0,0 monster Cobalt Mineral 1976,15,5000
    1 point
  12. input .@amount,0,.@maximum; if( !.@amount ) close; // <---- Add this
    1 point
  13. Try ./configure --enable-64bit
    1 point
×
×
  • Create New...