Jump to content

skyleo

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by skyleo

  1. I don't know but I know that checkwug exists.
  2. setgryphon does also not exist, it's included in setriding. EDIT: Seems that your codesnippet was right but Eden used some snippet of shit. EDIT2: looked in eden's script he did it right, sorry for insulting you.
  3. There is no setpecopeco it's called setriding. Also it seems the setcart 0; is missing. EDIT: Does the function setwarg even exist? It's not written down in script_commands.txt
  4. Ah, okay, I think I got what you meant. I just assumed that every selection in the menu is a category so this is my solution: //Synthesizer quest - Base (EDEN) prontera,104,54,4 script Scientist Que 857,{ if (BaseLevel > 70) { mes "[scientist Que]"; mes "...So you're here for"; mes "the energy crystals."; mes "You need to hunt 100 monster!"; mes "For every crystal energy!"; next; mes "[scientist Que]"; mes "So.. choose what energy crystals you want. Goodluck!"; next; switch(select("Unrefined Crystal Energy:Refined Crystal Energy:Pure Crystal Energy - 5:Pure Cyrstal Energy - 10")) { case 1: if(bincat_quel&1) { mes "You're already doing one quest of this category, please complete it before starting a new one."; close; } if(checkquest(19950) != 1){ switch(select("Requiem:Bathory:Spring Rabbit:Sleeper:Evil Druid:Petite:Clock")) { case 1: callsub L_Quest1,19900,"Requiem"; case 2: callsub L_Quest1,19901,"Bathory"; case 3: callsub L_Quest1,19902,"Spring Rabbit"; case 4: callsub L_Quest1,19903,"Sleeper"; case 5: callsub L_Quest1,19904,"Evil Druid"; case 6: callsub L_Quest1,19905,"Petite"; case 7: callsub L_Quest1,19906,"Clock"; } set bincat_quel, bincat_quel^1; }else{ set bincat_quel, bincat_quel^1; mes "[scientist Que]"; mes "You have just finished.."; mes "Unrefined Energy Crystal Quest"; mes "Comeback after 23 hours!"; close; } case 2: if(bincat_quel&2) { mes "You're already doing one quest of this category, please complete it before starting a new one."; close; } if(checkquest(19951) != 1){ switch(select("Siroma:Dark Priest:Stapo:Solider")) { case 1: callsub L_Quest2,19907,"Siroma"; case 2: callsub L_Quest2,19908,"Dark Priest"; case 3: callsub L_Quest2,19909,"Stapo"; case 4: callsub L_Quest2,19910,"Solider"; } set bincat_quel, bincat_quel^2; }else{ set bincat_quel, bincat_quel^2; mes "[scientist Que]"; mes "You have just finished.."; mes "Refined Energy Crystal Quest"; mes "Comeback after 23 hours!"; close; } case 3: if(bincat_quel&3) { mes "You're already doing one quest of this category, please complete it before starting a new one."; close; } if(checkquest(19952) != 1){ switch(select("Desert Wolf:Medusa:Pinguicula:Majoruros")) { case 1: callsub L_Quest3,19911,"Desert Wolf"; case 2: callsub L_Quest3,19912,"Medusa"; case 3: callsub L_Quest3,19913,"Pinguicula"; case 4: callsub L_Quest3,19914,"Majoruros"; } set bincat_quel, bincat_quel^3; }else{ set bincat_quel, bincat_quel^3; mes "[scientist Que]"; mes "You have just finished.."; mes "Pure Energy Crystal Quest"; mes "Comeback after 23 hours!"; close; } case 4: if(bincat_quel&4) { mes "You're already doing one quest of this category, please complete it before starting a new one."; close; } if(checkquest(19953) != 1){ switch(select("Raydric:Naga:Ancient Mummy:Ancient Mimic")) { case 1: callsub L_Quest4,19915,"Raydric"; case 2: callsub L_Quest4,19916,"Naga"; case 3: callsub L_Quest4,19917,"Ancient Mummy"; case 4: callsub L_Quest4,19918,"Ancient Mimic"; } set bincat_quel, bincat_quel^4; }else{ set bincat_quel, bincat_quel^4; mes "[scientist Que]"; mes "You have just finished.."; mes "Pure Energy Crystal Quest"; mes "Comeback after 23 hours!"; close; } } end; }else{ mes "[scientist Que]"; mes "Sorry but you're not strong enough"; mes "to get this quest reward yet!"; mes "Come back again next time!"; mes "Thanks!"; close; end; } L_Quest1: if (checkquest(getarg(0),HUNTING) == 2) { mes "[scientist Que]"; mes "Wow! You're amazing!"; mes "You hunted all 100 "+getarg(1)+"."; next; mes "[scientist Que]"; mes "As a reward, here is your unrefined crystal energy.."; mes "Hope you can make the improved item of your choice!.."; next; erasequest getarg(0); getitem 6623,10; setquest 19950; mes "[scientist Que]"; mes "Wooohoo!"; mes "Good luck."; close; } if (checkquest(getarg(0)) == -1) { setquest getarg(0); mes "[scientist Que]"; mes "Please hunt 100 "+getarg(1)+" and return here."; close; } mes "[scientist Que]"; mes "Umm? You didn't hunt"; mes "all 100 "+getarg(1)+" yet..."; mes "Will you check again?"; close; L_Quest2: if (checkquest(getarg(0),HUNTING) == 2) { mes "[scientist Que]"; mes "Wow! You're amazing!"; mes "You hunted all 100 "+getarg(1)+"."; next; mes "[scientist Que]"; mes "As a reward, here is your unrefined crystal energy.."; mes "Hope you can make the improved item of your choice!.."; next; erasequest getarg(0); getitem 6624,10; setquest 19951; mes "[scientist Que]"; mes "Wooohoo!"; mes "Good luck."; close; } if (checkquest(getarg(0)) == -1) { setquest getarg(0); mes "[scientist Que]"; mes "Please hunt 100 "+getarg(1)+" and return here."; close; } mes "[scientist Que]"; mes "Umm? You didn't hunt"; mes "all 100 "+getarg(1)+" yet..."; mes "Will you check again?"; close; L_Quest3: if (checkquest(getarg(0),HUNTING) == 2) { mes "[scientist Que]"; mes "Wow! You're amazing!"; mes "You hunted all 100 "+getarg(1)+"."; next; mes "[scientist Que]"; mes "As a reward, here is your unrefined crystal energy.."; mes "Hope you can make the improved item of your choice!.."; next; erasequest getarg(0); getitem 6625,5; setquest 19952; mes "[scientist Que]"; mes "Wooohoo!"; mes "Good luck."; close; } if (checkquest(getarg(0)) == -1) { setquest getarg(0); mes "[scientist Que]"; mes "Please hunt 100 "+getarg(1)+" and return here."; close; } mes "[scientist Que]"; mes "Umm? You didn't hunt"; mes "all 100 "+getarg(1)+" yet..."; mes "Will you check again?"; close; L_Quest4: if (checkquest(getarg(0),HUNTING) == 2) { mes "[scientist Que]"; mes "Wow! You're amazing!"; mes "You hunted all 100 "+getarg(1)+"."; next; mes "[scientist Que]"; mes "As a reward, here is your unrefined crystal energy.."; mes "Hope you can make the improved item of your choice!.."; next; erasequest getarg(0); getitem 6625,10; setquest 19953; mes "[scientist Que]"; mes "Wooohoo!"; mes "Good luck."; close; } if (checkquest(getarg(0)) == -1) { setquest getarg(0); mes "[scientist Que]"; mes "Please hunt 100 "+getarg(1)+" and return here."; close; } mes "[scientist Que]"; mes "Umm? You didn't hunt"; mes "all 100 "+getarg(1)+" yet..."; mes "Will you check again?"; close; } It's working with bits and xor. I use the character-var bincat_quel and every category has a bit, so since there are 4 categories, there are 4 bits. When you start one quest the bit should be set to 1 of the category. Selecting the same category will activate the if clause which says, that you're already doing one quest of this category. set bincat_quel, bincat_quel^1; Sets the first bit or unsets it ( Example first bit = 0 it will be set to 1 if it's 1 it will be set to 0.) Hope this will work, never worked with bits in eathena's script language. EDIT: It seems that the script is talking about a cooldown of 23 hours but doesn't set it. Should I add that too or do you got it already?
  5. THanks for this information but did you do anything I mentioned at the end of my post? Just don't copy the old const.txt it seems that it's broken with killedrid when using a newer version of the trunk.
  6. Richtig, aber das in Rand sollte +1 sein weil er sonst nicht die 240000 als rand ausgeben würde, sondern allerhöchstens die 239999.
  7. 5 - 1 = 4 Du scheinst dir wohl meine Veranschaulichung nicht durchgelesen zu haben. Das Minimum ist dann erreicht, wenn du das Maximum minus die Zahl in rand() nimmst und das Minimum als Ergebnis rausbekommst. Um diesen Wert zu berechnen musst du Maximum - Minimum rechnen. Daher musst du auch 240000 als Wert nehmen. So wie du es bisher hast, ist die Respawnzeit 4-5 Minuten, genauso, wie du es eben beschrieben hast.
  8. Vielleicht solltest du es einfach mal versuchen, anstatt es zu fragen. Wenn der Server die jeweiligen Packets des Clients besitzt, sollte das klappen.
  9. Dürfte ich deinen Versuch bitte sehen, evtl. hast du etwas falsch gemacht. Vom Prinzip her sollte es nämlich klappen, haben dazu eine kleine Veranschaulichung für mich gemacht: An sich ein schönes Prinzip, evtl. haste vergessen hier bei den Maximalen Timer (OnTimerXXX) zu setzen. PS: Du solltest übrigens wissen, dass OnNPCKillEvents nicht diese Monster triggern können, da sie ein OnLabel bereits selbst haben und somit diese Monster ignoriert werden. Sofern kein NPC irgendetwas an Monster Kills global beobachtet sollte das aber kein Problem darstellen.
  10. wakoko, it's blocking nothing above +11 and under +20. Since it will just go out of the if clause, when there's no close. Could you describe the error more? Does the npc say that the refining failed? Edit: But yes wakoko, it does make more sense to change the if. Also the if didn't really make sense at the unmodified NPC. Edit2(Maybe the solution): You need to have the chances for +11 to +20 in your refine_db.txt located in the db folder, otherwise it might have just the chance 0% since there's no value defined.
  11. I think you mean that this Refiner should only refine Items which already have +10 or higher. This should work: function script refinenew { set .@features,getarg(1); mes "[" + getarg(0) + "]"; mes "I'm the Armsmith."; mes "I can refine all kinds of weapons, armor and equipment, so let me"; mes "know what you want me to refine."; next; // Item Security Script if( getsecurity() ) { mes "[" + getarg(0) + "]"; mes "You can't refine. Blocked with @security."; close; } // ******************** setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3"; set .@menu$,""; for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) { if( getequipisequiped(.@i) ) set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + ":"; } set .@part,select(.@menu$); if(!getequipisequiped(.@part)) { mes "[" + getarg(0) + "]"; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion 6; close; } //Check if the item is refinable... if(!getequipisenableref(.@part)) { mes "[" + getarg(0) + "]"; mes "I don't think I can"; mes "refine this item at all..."; close; } //Check if the item is identified... (Don't know why this is in here... but kept it anyway) if(!getequipisidentify(.@part)) { mes "[" + getarg(0) + "]"; mes "You can't refine this"; mes "if you haven't appraised"; mes "it first. Make sure your"; mes "stuff is identified before"; mes "I can refine it."; close; } //Check to see if the items is already +10 if(getequiprefinerycnt(.@part) >= 10) { if( .@features || getequiprefinerycnt(.@part) >= 20 ) { mes "[" + getarg(0) + "]"; mes "I can't refine this"; mes "any more. This is as"; mes "refined as it gets!"; close; } } else { //added Part to disable refine under +10 mes "[" + getarg(0) + "]"; mes "I can't refine something which is refined lower than +10"; close; } set .@refineitemid, getequipid(.@part); // save id of the item set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count switch(getequipweaponlv(.@part)){ case 0: //Refine Armor if( .@refinerycnt < 10 ) { set .@price,2000; set .@material,985; } else { set .@price,100000; set .@material,6223; } set .@safe,4; break; case 1: //Refine Level 1 Weapon if( .@refinerycnt < 10 ) { set .@price,50; set .@material,1010; } else { set .@price,100000; set .@material,6224; } set .@safe,7; break; case 2: //Refine Level 2 Weapon if( .@refinerycnt < 10 ) { set .@price,200; set .@material,1011; } else { set .@price,100000; set .@material,6224; } set .@safe,6; break; case 3: //Refine Level 3 Weapon if( .@refinerycnt < 10 ) { set .@price,5000; set .@material,984; } else { set .@price,100000; set .@material,6224; } set .@safe,5; break; case 4: //Refine Level 4 Weapon if( .@refinerycnt < 10 ) { set .@price,20000; set .@material,984; } else { set .@price,100000; set .@material,6224; } set .@safe,4; break; case 5: //Refine other stuff? if( .@refinerycnt < 10 ) { set .@price,2000; set .@material,985; } else { set .@price,100000; set .@material,6223; } set .@safe,4; break; } if(.@features != 1) { mes "[" + getarg(0) + "]"; mes "To refine this I need"; mes "one ^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 "[" + getarg(0) + "]"; mes "Yeah..."; mes "There's no need to"; mes "rush. Take your time."; close; } if(getequippercentrefinery(.@part) < 100) { mes "[" + getarg(0) + "]"; 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; case 6223: case 6224: mes "be ^FF0000downgraded by 3 levels!^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; // Purified Elu-Ori switch(.@material) { case 984: if( countitem(6240) ) { mes "[" + getarg(0) + "]"; mes "Oh, what's that? You have a ^0000FFPurified Oridecon^000000, i can use it and if refine process fail, the weapon will only lost one refine point."; next; if( select("Use Purified Oridecon:Continue with a normal one") == 1 ) set .@material,6240; } break; case 985: if( countitem(6241) ) { mes "[" + getarg(0) + "]"; mes "Oh, what's that? You have a ^0000FFPurified Elunium^000000, i can use it and if refine process fail, the equipment will only lost one refine point."; next; if( select("Use Purified Elunium:Continue with a normal one") == 1 ) set .@material,6241; } break; case 6223: if( countitem(6225) ) { mes "[" + getarg(0) + "]"; mes "Oh, what's that? You have a ^0000FFHigh Density Kalunium^000000, i can use it and if refine process fail, the equipment will only lost one refine point."; next; if( select("Use High Density Kalunium:Continue with a normal one") == 1 ) set .@material,6225; } break; case 6224: if( countitem(6226) ) { mes "[" + getarg(0) + "]"; mes "Oh, what's that? You have a ^0000FFHigh Density Bradium^000000, i can use it and if refine process fail, the equipment will only lost one refine point."; next; if( select("Use High Density Bradium:Continue with a normal one") == 1 ) set .@material,6226; } break; } mes "["+getarg(0)+"]"; mes "I can't make it any clearer."; if( .@material == 6240 || .@material == 6241 || .@material == 6225 || .@material == 6226 ) { mes "If the refine fails the"; mes "equip will lose one refine"; mes "point."; } else if( .@material == 6223 || .@material == 6224 ) { mes "If the refine fails the"; mes "equip will lose three refine"; mes "points."; } else { 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 "[" + getarg(0) + "]"; mes "I completely agree..."; mes "I might be a great refiner, but sometimes even I make mistakes."; close; } } if((countitem(.@material) < 1) || (Zeny < .@price)) { mes "[" + getarg(0) + "]"; 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; } set Zeny,Zeny-.@price; delitem .@material,1; if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?) mes "[" + getarg(0) + "]"; mes "Look here... you don't have any Items on..."; close; } if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item mes "[" + getarg(0) + "]"; Emotion e_an; 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)) { if( .@material == 6240 || .@material == 6241 || .@material == 6225 || .@material == 6226 ) failedrefitemr .@part,1; // Lost one refine else if( .@material == 6223 || .@material == 6224 ) failedrefitemr .@part,3; // Lost three refines else failedrefitem .@part; // Break the equip mes "[" + getarg(0) + "]"; set .@emo,rand(1,5); if (.@emo == 1) { Emotion e_cash; } else { Emotion e_swt; } set .@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 e_heh; set .@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; } // New Refining Functions ======================== if(getequiprefinerycnt(.@part) < .@safe) { mes "[" + getarg(0) + "]"; mes "I can refine this to the safe limit or a desired number of times... it's your choice..."; next; set .@menu2,select("To the safe limit please.","I'll decide how many times.","I've changed my mind..."); } else set .@menu2,2; switch(.@menu2){ case 1: set .@refinecnt,.@safe - getequiprefinerycnt(.@part); break; case 2: next; mes "[" + getarg(0) + "]"; mes "So how many times would you like me to refine your item?"; next; input .@refinecnt; set .@refinecheck,.@refinecnt + getequiprefinerycnt(.@part); if (.@refinecnt < 1 || .@refinecheck > 10) { mes "[" + getarg(0) + "]"; mes "I can't refine this item that many times."; close; } if(.@refinecheck > .@safe) { set .@refinecheck,.@refinecheck - .@safe; mes "[" + getarg(0) + "]"; mes "This will try to refine the equipment " + .@refinecheck + " times past the safe limit. Your equipment may be destroyed... is that ok?"; next; if(select("Yes...","No...") == 2){ mes "[" + getarg(0) + "]"; mes "You said so..Hmm so be it..."; close; } } break; case 3: next; mes "[" + getarg(0) + "]"; mes "You said so..Hmm so be it..."; close; } set .@fullprice,.@price * .@refinecnt; mes "[" + getarg(0) + "]"; mes "That will cost you " + .@refinecnt + " " + getitemname(.@material) + " and " + .@fullprice + " Zeny. Is that ok?"; next; if(select("Yes","No...") == 2){ mes "[" + getarg(0) + "]"; mes "You said so..Hmm so be it..."; close; } if(countitem(.@material) < .@refinecnt || Zeny < .@fullprice) { mes "[" + getarg(0) + "]"; mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes."; close; } set Zeny,Zeny - .@fullprice; delitem .@material,.@refinecnt; while(.@refinecnt){ if (getequipisequiped(.@part) == 0) { mes "[" + getarg(0) + "]"; mes "Look here... you don't have any Items on..."; close; } if (getequipid(.@part) != .@refineitemid || (.@menu2 == 1 && getequippercentrefinery(.@part) < 100)) { mes "[" + getarg(0) + "]"; mes "Clan... No, but Did you imagine I could be so stupid !?!"; mes "You have changed it..."; mes "Go out before I stun you with my Hammer!!!"; close; } mes "Clang, clang!!!"; if(.@menu2 == 2 && getequippercentrefinery(.@part) <= rand(100)) { failedrefitem .@part; emotion 23; mes "[" + getarg(0) + "]"; mes "WAHHHH!!! I'm so sorry... I warned you this could happen..."; set .@refinecnt,.@refinecnt - 1; if(.@refinecnt == 0) close; mes "Here's the unused Zeny and Material back..."; getitem .@material,.@refinecnt; set .@fullprice,.@refinecnt * .@price; set Zeny,Zeny + .@fullprice; close; } successrefitem .@part; emotion 21; set .@refinecnt,.@refinecnt - 1; next; } mes "[" + getarg(0) + "]"; mes "All finished... Come again soon."; close; } I just added this part at the if-clause which asks if it is already higher or +10. else { //added Part to disable refine under +10 mes "[" + getarg(0) + "]"; mes "I can't refine something which is refined lower than +10"; close; } This will abort the conversation when the item is not +10 or higher.
  12. As I see the script gives the killer also a Skull of the killed player, does it also have the name null or does it work? Could you change the announce so that it just announces the killedrid instead of rid2name(killedrid) it would be interesting if it is already nulled when rid2name isn't used. Edit: Found a nearly same topic: http://www.eathena.ws/board/index.php?showtopic=279625 The solution at the end was updating the const.txt . Are you using a old or modified version? It seemed that this line at 280 was missing: killedrid 122 1
  13. Is this a coincidence or is this happening every time when a player kills someone? It might be that the killed player disconnected or went to character selection before the kill could be announced. Maybe you should set a variable, which includes the killedrid, at the beginning of the Event. It could be that it takes too long to get to the announcement part and the player already logged out.
  14. Wie ich sehe hattest du die Frage bereits im eAthena-Forum gestellt: http://www.eathena.ws/board/lofiversion/index.php/t271907.html Dort war sogar eine Lösung(ganz am Ende) parat, zwar als Skript, aber dennoch eine Lösung. Evtl. hast du es ja überlesen, aber das zumindest würde klappen, wenn du es schöner brauchst, wäre ein SRC-Edit von Nöten, der das Respawnsystem ändert bzgl. der Parameter delay1 und delay2.
×
×
  • Create New...