Jump to content

Alayne

Members
  • Content Count

    345
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Alayne

  1. Well that's two features I didn't think off, but yep, that's possible for the reset. For the question, what do you mean? See the name of all peoples in easy mode?
  2. Hi peoples, I have serious issue with custom battleground addons. Even the base mechs doesn't work, as I can't get players to be warped to fighting zone as awaited. Here's the associated code: bat_room,120,157,4 script Registration::Fl2R_Croixs 414,{ end; OnInit: waitingroom "Team Croix",5,"Flavius_BG2_Custom::OnCroixJoin",1; end; OnEnterBG: if($@FlaviusBG2 == 0) { set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",10,290,"Flavius_BG2_Custom::OnCroixQuit",""); bg_warp $@FlaviusBG2_id2,"bat_b02",10,290; //debugmes "C: " + $@FlaviusBG2_id2; //sleep 10000; end; } if($@FlaviusBG2 == 1) { debugmes "single join"; waitingroom2bg_single($@FlaviusBG2_id2,"bat_b02",10,290,""); warp "bat_b02",10,290; } end; } for both registration npcs, OnReadyCheck: set .@Guillaume, getwaitingroomstate(0,"Fl2R_Guillaumes"); set .@Croix, getwaitingroomstate(0,"Fl2R_Croixs"); set .@currentGuillaumePlayer, bg_get_data($@FlaviusBG2_id1, 0); set .@currentCroixPlayer, bg_get_data($@FlaviusBG2_id2, 0); //debugmes "G: " + (.@Guillaume + .@currentGuillaumePlayer) + ", C: " + (.@Croix + .@currentCroixPlayer); if($@FlaviusBG2 == 0) { if( .@Guillaume + .@currentGuillaumePlayer < .BGMinPlayer || .@Croix + .@currentCroixPlayer < .BGMinPlayer ) { mapannounce "prontera","Battleground G: " + .@Guillaume + ", C: " + .@Croix,1,0x808000; end; } else { donpcevent "Fl2R_Guillaumes::OnEnterBG"; donpcevent "Fl2R_Croixs::OnEnterBG"; } } if($@FlaviusBG2 == 1) { debugmes "join"; donpcevent "Fl2R_Guillaumes::OnEnterBG"; donpcevent "Fl2R_Croixs::OnEnterBG"; goto OnUpdateScoreBoard; } and the starting bg part. I got all the debugmes as they should be, but nothing works, players aren't warped. Right there there should be two different warps: starting ones (2 players, one in each waitingroom), and a second one for anybody joining once the match is started (with the waitingroom2bg_single). Can anybody give me a hint on what I'm missing?
  3. Here you go. Couldn't test it now, but it should work. - script mypvppoints -1,{ OnInit: bindatcmd "pvppoints",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: dispbottom "[ PvP Points ] : Your PvP Points: "+PvPPoints; end; } - script check player -1,{ OnPCLoginEvent: if(!PvPPoints) { PvPPoints = 0; PvPWarning = 0; } end; } - script PvPPointTimer -1,{ OnTimerStart: sleep2 90000; PvPFlag = 0; end; } - script PvP Points -1,{ OnPCKillEvent: for (set @i,0; @i < getarraysize(.Open_Maps$); set @i,@i+1) if( strcharinfo(3) == .Open_Maps$[@i] ) { if(PvPFlag && (killedrid == PrevKilled)) { PvPWarning += 1; if(PvPWarning >= .cons_kill_count) { PvPPoints -= .deducted_points; callsub L_PointCheck,PvPPoints; dispbottom "You've lost "+.deducted_points+" PvP Points."; dispbottom "You now have "+PvPPoints+" Points."; PvPWarning = 0; callsub Timer; } PvPPoints += .added_points; dispbottom "You've been awarded "+.added_points+" PvP Point."; dispbottom "You now have "+PvPPoints+" Points."; Timer: awake "PvPPointTimer"; PvPFlag = 1; doevent "PvPPointTimer::OnTimerStart"; end; } if ( killedrid == getcharid(3) ) { PvPPoints -= .deducted_points; callsub L_PointCheck,PvPPoints; dispbottom "You've lost "+.deducted_points+" PvP Point."; dispbottom "You now have "+PvPPoints+" Points."; end; } callsub AddPoint; attachrid(killedrid); PvPPoints -= .deducted_points; callsub L_PointCheck,PvPPoints; dispbottom "You've lost "+.deducted_points+" PvP Point."; dispbottom "You now have "+PvPPoints+" Points."; detachrid; AddPoint: PvPPoints += .added_points; dispbottom "You've been awarded "+.added_points+" PvP Point."; dispbottom "You now have "+PvPPoints+" Points."; PrevKilled = killedrid; PvPFlag = 1; doevent "PvPPointTimer::OnTimerStart"; end; L_PointCheck: if(getarg(0) < 0) PvPPoints = 0; return; end; } OnClock1200: set .added_points, .advPvpPoint; end; OnClock1230: set .added_points, .basePvpPoint; end; OnClock1500: set .added_points, .advPvpPoint; end; OnClock1530: set .added_points, .basePvpPoint; end; OnClock1800: set .added_points, .advPvpPoint; end; OnClock1830: set .added_points, .basePvpPoint; end; OnClock2100: set .added_points, .advPvpPoint; end; OnClock2130: set .added_points, .basePvpPoint; end; OnInit: // Put the map you want to enable the PvP Points ( only for Option 1 ) setarray .Open_Maps$[0],"guild_vs3","geffen","morocc","prontera"; set .cons_kill_count,5; // count consecutive kill in the same player ( Default 5 ) set .deducted_points,30; // deducted points in killing the same player ( Default 5 ) set .basePvpPoint, 1; set .advPvpPoint, 1; set .added_points, .basePvpPoint; end; } Is the initial script one of yours? Cause there's strange positions for some label...I didn't touch anything to prevent any "additionnal error", but not sure this one'll work...
  4. Well I think I can, but the explanations are a bit messy. You want basically a pvppoint count, 1 point per kill on normal time, but 5 point per kill on particular hour range, right? Which range exactly? Specific per days?
  5. Alayne

    R>Warper NPC

    Well that's pretty simple. Remove the menu option from the current one. Are you okay with the re one, if we take off everything that is "re", instance, guilds and so on?
  6. I think you'd better try to understand yourself what I changed, and why. But still... // Disable Kafra disablenpc "Kafra Employee#"+strnpcinfo(NPC_NAME_HIDDEN); announce strcharinfo(0) + " from ["+getguildname(.@GID)+"] guild conquered the ["+.@region$+" "+charat(strnpcinfo(NPC_NAME_HIDDEN),3)+"] stronghold of "+getcastlename(strnpcinfo(NPC_MAP))+"!",bc_all|bc_woe; mapannounce strnpcinfo(NPC_MAP),"The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;
  7. Okay, try this. // Respawn the Emperium, and display new owners. set .@brokerName$, strcharinfo(0); sleep2 500; // Slow down script execution slightly. if( agitcheck() ) donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena"; sleep2 7000; announce "The [" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "] castle has been conquered by " + .@brokerName$ + ", from [" + getguildname(.@GID) + "] guild.",bc_all|bc_woe; end;
  8. Send me the complete file in pm. I need to see the entire file, if you've made mods. Do you have error in the map server? There shouldn't be a "blank". The name si provided or not. If the announce pops, then there's no error. If there's an error (should basically be "script unattached"), the announce doesn't pop. See?
  9. Well I don't know what I can say more than "edit messages.conf in conf folder"...
  10. What do you mean? You want to prevent it from being usable with daggers? If that's so, remove the WeaponRequirement Daggers on Skill_db.txt.
  11. Warning isn't an error, it just warn's you that some part of the allocated variables aren't use in the following code section. You can also comment the warned line to remove the error. To get the message working, you have to update the messages.conf file in conf folder, to add a description for given id.
  12. Alayne

    In-Game Clock

    Hum I'll need to give it a further check then. I'll try doing so this evening, stay in touch.
  13. Here you are. prt_in,61,54,3 script PoD Refiner 4_M_FAIRYKID6,{ OnUsed: set .Mode,0; // Refine mode [ 0 = Refine +1 Each time / 1 = Refine to Max Limit ] set .EquipCheck,1; // Check Equips is refineable or not. [ 0 = Disable / 1 = Enable ] set .MaxRefine,7; // Max Refine Limit set .MaxRefine2,20; // Max Refine Limit [ for Mode 2 Max Refine ] set .TicketID,7179; // Ticket ID if( countitem(.TicketID) < 100 ){ mes "You don't have enough "+getitemname(.TicketID)+" to continue this process."; mes "You need ^FF0000100 PoD^000000 to refine +1 Each time, and the success rate is ^FF0000100%^000000."; close; } set .@choice, (select( ( getequiprefinerycnt(1) >= .MaxRefine2 || getequipisequiped(1) == 0 )?"":"Headgear [ ^4EEE94"+getequipname(1)+"^000000 ]", ( getequiprefinerycnt(2) >= .MaxRefine2 || getequipisequiped(2) == 0 )?"":"Armor [ ^4EEE94"+getequipname(2)+"^000000 ]", ( getequiprefinerycnt(3) >= .MaxRefine2 || getequipisequiped(3) == 0 )?"":"Left Hand [ ^4EEE94"+getequipname(3)+"^000000 ]", ( getequiprefinerycnt(4) >= .MaxRefine2 || getequipisequiped(4) == 0 )?"":"Right Hand [ ^4EEE94"+getequipname(4)+"^000000 ]", ( getequiprefinerycnt(5) >= .MaxRefine2 || getequipisequiped(5) == 0 )?"":"Garment [ ^4EEE94"+getequipname(5)+"^000000 ]", ( getequiprefinerycnt(6) >= .MaxRefine2 || getequipisequiped(6) == 0 )?"":"Shoes [ ^4EEE94"+getequipname(6)+"^000000 ]", "^FF0000End^000000")); mes "[PoD Refiner]"; mes "Hmm... is this the one you want to refine?"; mes "To refine this equipment, I need 100 PoD to refine +1 Each time, and the success rate is ^FF0000100%^000000."; mes "Do you really want to refine this?"; next; if(select("Yes", "No") == 2) { mes "[PoD Refiner]"; mes "Okay. If that's what you want..."; close; } if ( .Mode == 0 ) { callsub RefineSystem,.@choice; } if ( .Mode == 1 ) { callsub MaxRefineSystem,.@choice; } if ( .Mode == 2 ) { callsub NewRefineSystem,.@choice; } close; RefineSystem: if ( .EquipCheck == 1 && getequipisenableref(getarg(0)) == 0 ){ mes "I can't refine this item.because this item is unrefinable."; close; } if(getequiprefinerycnt(getarg(0)) < .MaxRefine) { mes "I can't refine this item."; mes "You must refine to at least minimum ^0000FF+7^000000 first when you bring to me."; close; } successrefitem (getarg(0)); if ( getequiprefinerycnt( .@part ) >= 10 ) announce strcharinfo( 0 ) + " refine his/her item for +" + getequiprefinerycnt( .@part ) + " now!", 0; message strcharinfo(0),"This item successfully upgrade."; delitem .TicketID,100; mes "[PoD Refiner]"; mes "The sound refreshes my mind everytime I hear it."; mes "Here, have it. Refine succeeded flawlessly!"; close; MaxRefineSystem: if ( .EquipCheck == 1 && getequipisenableref(getarg(0)) == 0 ){ mes "I can't refine this item.because this item is unrefinable."; close; } for ( set .@i,getequiprefinerycnt(getarg(0)); getequiprefinerycnt(getarg(0)) < .MaxRefine; set .@i,getequiprefinerycnt(getarg(0)) ){ successrefitem (getarg(0)); if ( getequiprefinerycnt( .@part ) >= 10 ) announce strcharinfo( 0 ) + " refine his/her item for +" + getequiprefinerycnt( .@part ) + " now!", 0; } message strcharinfo(0),"this item successfully upgrade."; delitem .TicketID,100; mes "[PoD Refiner]"; mes "The sound refreshes my mind everytime I hear it."; mes "Here, have it. Refine succeeded flawlessly!"; close; NewRefineSystem: if ( .EquipCheck == 1 && getequipisenableref(getarg(0)) == 0 ){ mes "I can't refine this item.because this item is unrefinable."; close; } mes "I just able to refine equipments start from +7 ~ +20."; next; while ( countitem(.TicketID) > 0 && getequiprefinerycnt(getarg(0)) < .MaxRefine ){ successrefitem (getarg(0)); if ( getequiprefinerycnt( .@part ) >= 10 ) announce strcharinfo( 0 ) + " refine his/her item for +" + getequiprefinerycnt( .@part ) + " now!", 0;delitem .TicketID,100; } while ( countitem(.TicketID) > 1 && getequiprefinerycnt(getarg(0)) > .MaxRefine && getequiprefinerycnt(getarg(0)) < .MaxRefine2 ){ successrefitem (getarg(0)); if ( getequiprefinerycnt( .@part ) >= 10 ) announce strcharinfo( 0 ) + " refine his/her item for +" + getequiprefinerycnt( .@part ) + " now!", 0;delitem .TicketID,100; } message strcharinfo(0),"this item successfully upgrade."; close; } I'll also add some advices for you, to get the right habits as soon as possible: 1- When scripting, use indentation. The code is way more readable, clear, and easy to understand if you can determine where something start and end, especially with lots of conditions scripts. 2- In a switch method, always end a case with a "break" option. Otherwise, it'll pass through all the case after the one considered, until the last one 3- As far as possible, if there's copy/pasted code, you can factorize it. Which mean that you can call it once, with a particular variable. Hope it'll help ^^
  14. Alayne

    Configure reward

    As I said, that's not only a reward configuration that you'll need to do something like that. You'll also have to edit the "get reward" section. Send me your script, and I'll update it, with comments for you to understand.
  15. Well with the value you provided, there's a 1% chance to get an item. So basically, the rate is pretty low. Did you tried with higher values, to be sure the chance are well read? Cause basically, it should work.
  16. // Respawn the Emperium, and display new owners. sleep2 500; // Slow down script execution slightly. if( agitcheck() ) donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena"; sleep2 7000; announce "The [" + getcastlename(strnpcinfo(NPC_NAME_HIDDEN)) + "] castle has been conquered by " + strcharinfo(0) + ", from [" + getguildname(.@GID) + "] guild.",bc_all|bc_woe; end;
  17. Alayne

    Refine Deed NPC

    Give this a try. Couldn't test it, not at home right now, but still.. // http://rathena.org/board/topic/83017-pro-lotti-girl-refine-master/ prontera,184,177,5 script Refine Master 851,{ function _check { if(getequiprefinerycnt(getarg(0))) { next; mes "Your equip refine level should be 0."; close; } if(!getequipisenableref(getarg(0))) { next; mes "I can't refine this."; close; } return; } mes "I'll make your item refined up to same level with your Ticket you have."; mes "You don't have to worry! There's no chance to break your item."; set @c,select("+5 Weapon Deed", "+6 Weapon Deed", "+7 Weapon Deed", "+8 Weapon Deed", "+9 Weapon Deed", "+10 Weapon Deed", "+5 Armor Deed", "+6 Armor Deed", "+7 Armor Deed", "+8 Armor Deed", "+9 Armor Deed", "+10 Armor Deed"); set @deed_item_id,8000+@c; if(@c > 6) { set @c, @c + 2; } set @deed_item_id,8000+@c; //set @deed_item_id,7037; if(!countitem(@deed_item_id)) { next; mes "You don't have '"+getitemname(@deed_item_id)+"'"; close; } if(0<@c&&@c<7) { set @b,5-select(""+getequipname(EQI_HAND_R)+":"+(getiteminfo(EQI_HAND_L,2)==4?getequipname(EQI_HAND_L):"")); _check(@; }else{ set @b,select(getequipname(EQI_HEAD_TOP)+":"+getequipname(EQI_ARMOR)+":"+getequipname(EQI_GARMENT)+":"+getequipname(EQI_SHOES)+":"+(getiteminfo(EQI_HAND_L,2)==4?"":getequipname(EQI_HAND_L))); deletearray .@way[0],128; setarray .@way[1],1,2,5,6,3; set @b,.@way[@b]; _check(@; } next; setarray .@ref[0],5,6,7,8,9,10; set @r,.@ref[@c%8]; mes "I'm going to refine"; mes ""+getequipname(@+""; mes "up to "+@r+" level with"; mes ""+getitemname(@deed_item_id)+""; mes "may I go on this job?"; if(select("No","Yes")==2) { if(!countitem(@deed_item_id)) { next; mes "You don't have '"+getitemname(@deed_item_id)+"'"; close; } _check(@; for(set .@i,0;.@i<@r;set .@i,.@i+1) successrefitem @b; mes "Done"; delitem @deed_item_id,1; } set @c,0; set @b,0; set @r,0; set @deed_item_id,0; close; }
  18. Here you are. Haven't been able to test it, as I'm not home, but it should work. // ============================= /* Free for All: http://herc.ws/board/topic/13863-rlast-man-standing-pvp-with-prize/ ---------------------------- by: Legend compatible w/: Hercules ---------------------------- special thanks to: * Annieruru ---------------------------- Description: * Free for all event like last man standing * Can be activated through command "@ffa" * Also can be activated every hour * You can set your own number of winners * Configurable settings (npc name, maps, minimum level to participate, maximum recognized winners, rewards, restricted jobs.) * Significant mapflags were set */ // ============================= prontera,156,157,4 script Request#2 4_CAT_DOWN,{ doevent "Request#2::OnMenu"; end; OnActivate: // activated by the GM if (agitcheck()) || (agitcheck2()){ mes .npc$; mes "WoE is in progress."; close; } if (.checkffa > 0) { mes .npc$; mes "Event is in progress."; close; } OnTimer150000: announce .npc$+": 30 seconds left before the registration will be closed.",bc_all; end; OnTimer180000: .checkffa = 2; if ( .psize <= .maxwin) { announce .npc$+": The Event has been cancelled! Not enough participants.",bc_all; callsub Reset_evt_stats; end; } announce .npc$+": Registration is now closed!",bc_all; end; OnTimer185000: mapannounce .pvpmap$,.npc$+": The Event will occur in a few moments!",bc_blue; end; OnTimer187000: mapannounce .pvpmap$,.npc$+": Get ready in 3!",bc_blue; end; OnTimer188000: mapannounce .pvpmap$,.npc$+": 2!",bc_blue; end; OnTimer189000: mapannounce .pvpmap$,.npc$+": 1!",bc_blue; end; OnTimer190000: stopnpctimer; mapannounce .pvpmap$,.npc$+": Good luck everyone!",bc_blue; setmapflag .pvpmap$, mf_pvp_noguild; removemapflag .pvpmap$, mf_noskill; pvpon .pvpmap$; end; OnMenu: mes .npc$; mes "Good day "+strcharinfo(0)+"!"; mes "How may I help you?"; next; switch(select("Information:Join")){ case 1: mes .npc$; mes "Minimum Base Level: ^FF0000"+.minblvl+"^000000"; mes "Restricted Jobs:"; for( .@z = 0; .@z < .rjsize; .@z++ ) { mes ( .@z +1 ) +". ^FF0000"+jobname (.resjob[.@z])+"^000000"; } close; case 2: if (.checkffa == 2) { mes .npc$; mes "Event is in progress, come back later."; close; } if (BaseLevel < .minblvl) { mes .npc$; mes "You need to"; mes "have ^FF0000"+.minblvl+"^000000 Base level or more than"; mes "before you can participate."; close; } for( .@z = 0; .@z < .rjsize; .@z++ ) { if (Class == .resjob[.@z] ){ mes .npc$; mes "Your job is restricted to join this event."; close; } } if(.checkffa == 0) { if (agitcheck()) || (agitcheck2()) { mes .npc$; mes "WoE is in progress, come back later."; close; } .checkffa = 1; announce .npc$+": Registration for the event is now open for 3 minutes!",bc_all; initnpctimer; } sc_end SC_ALL; percentheal 100,100; warp .pvpmap$,0,0; .regaid[.psize] = getcharid(3); .psize++; end; } OnPCDieEvent: OnPCLogoutEvent: if (strcharinfo(3) != .pvpmap$) end; while (.regaid != getcharid(3) && .@i < .psize) .@i++; deletearray .regaid[.@i],1; .psize--; if (.psize > .maxwin) end; if (.checkffa > 0) { announce .npc$+": The Event is now over! We already have our winners!",bc_all; for (.@i = 0; .@i < .psize; ++.@i){ getitem .ritem,.rcount,.regaid[.@i]; } } callsub Reset_evt_stats; end; Reset_evt_stats: removemapflag .pvpmap$, mf_pvp_noguild; setmapflag .pvpmap$, mf_noskill; pvpoff .pvpmap$; .checkffa = 0; deletearray .regaid; .psize = 0; mapwarp .pvpmap$,.extmap$,.extx,.exty,0; end; OnInit: bindatcmd "ffa",strnpcinfo(3)+"::OnActivate",99,99; // CONFIGURATION .npc$ = "[ Free for All ]"; // NPC name .pvpmap$ = "pvp_n_1-5"; // Set your FFA Map .minblvl = 99; // Set minimum base level who can enter .maxwin = 2; // Set the maximum winners .ritem = 7227; // Set the item id of the reward .rcount = 5; // Set reward amount .extmap$ = "prontera"; // Set exit map .extx = 150; // Exit map "x" coordinate .exty = 150; // Exit map "y" coordinate setarray .resjob[0], 0,4001; // This list serves as the restricted jobs .rjsize = getarraysize (.resjob); // DO NOT TOUCH THIS // MAPFLAGS setmapflag .pvpmap$, mf_noskill; pvpoff .pvpmap$; //--- setmapflag .pvpmap$, mf_nowarpto; setmapflag .pvpmap$, mf_nocommand; setmapflag .pvpmap$, mf_nowarp; setmapflag .pvpmap$, mf_nosave; setmapflag .pvpmap$, mf_noteleport; setmapflag .pvpmap$, mf_nomemo; setmapflag .pvpmap$, mf_novending; setmapflag .pvpmap$, mf_nobranch; end; }
  19. Simply remove the lines starting with "disablenpc".
  20. Hum...There's allready announce in the OnTeam1Win(2) and OnTeam2Win(2) labels. So basically, there's allready should have the message. You can simply change it if you want to add something in the display.
  21. Alayne

    Disguise Event

    Can you explain again what's the issue? The exact scenario? A player give the right answer for one round, then nothing's detected anymore? Is there any error on map server?
  22. Sorry, the question is...barely comprehensible... Can you explain a bit more what you're expecting?
  23. Alayne

    Configure reward

    Actually, the script portion can be described this way: reward_winitem_qnty ==> the number of different item you'll used as rewardint eh win_itemid array. win_itemid ==> the item id to use win_itemname ==> the name you want to display for the corresponding rank in the id array win_itemnum ==> the number of item players will get from the corresponding rank. Nothing in this section of your main script says 'Only x players will get the reward'. It's in another part of the script.
  24. So, for each point: 1- I've never tried it, I must admit it. Just change the value for integers, and change the rand. For instance, 0.1%, set 1 for success rate, and make a rand(1000) instead of a rand(100). It'll enable more lower chance. 2- remove the dispbottom, and add a getitem for the "bad luck" item. 3- check for the @pt[@i] value. if it's under a certain value (1, if you make a rand 1000, 10 for rand 1000...) and add an announce before the "end" command in the success section.
×
×
  • Create New...

Important Information

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