Jump to content

llchrisll

Members
  • Posts

    626
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by llchrisll

  1. llchrisll

    NPC

    First: wrong section Second: put your script into the npc/custom folder ( don't have to be custom, just overview) , open npc/scripts_custom.conf and add after npc: npc/location/to/script.tx npc: npc/custom/<Your Script File>.txt On server start or rather script load the map server console will print you errors if there are any. Regards, Chris
  2. Hello rAthena! I would like to request an possible modification of the script command mobcount. If it's possible to add the option to get the output saved in variables like in getmobdrops. Maybe an extra param like mobcount("map","event label"{,1}); 1 = save the output in variables Or anything, doesn't matter. My goal with this request would be, that it would allow menu creation for an dynamic mob quest as example: mobcount("lhz_dun02","",1); Mob ID Array: .@MobID Mob Quantity array: .@MobAmount These arrays obviously would have the respective content and via menu I could select the mob I need. It could be combined with an item collection quest too, via getmobdrops. I would also not mind be if it would be an extra command and maybe, but only maybe, officially implemented, because I'm scripting only for hobby not for an server do everybody could use it. Best regards, Chris
  3. Well, what I would require would be party/guild variables. But that's all. ?
  4. Okay, I don't see any difference... Let's see, when I'm at home from work I will take a better look at it. Regards, Chris
  5. Could you post us you're wedding script to check for differences, cuz in the rAthena there is no @name$ used, at least I didn't see it, only .@name$. But I think there are two different scripts at work, one with an OnPCLoginEvent and this church script. Do you have added an script recently to you're server? Edit: After reading Cyro's reply, I checked the image again and saw that the npc "Greet" calls that OnPCLoginEvent error.
  6. The console says something about Happy Marry in prt_church. But I couldn't find anything like the pcloginevent in that script, npc/other/marriage.txt.
  7. If you could post your script, we might be able to help you easier. Regards, Chris
  8. You're welcome, if you want you can take a look at my Fame System. I use it there the most. But nearly in every script of mine it's present. But it's just an average example in comparison of the scripts of the real pro scripts out there. ? Regards, Chris
  9. Okay, mistake on my side. You need to use as example: getd(".reqItemQty"+(.@n+1)+"["+.@i+"]") getd allows you to make an variable dynamical. .@n+1 because we reduced that value in the menu but your arrays don't have 0 in the name. But you could use .reqItemQty0 instead of .reqItemQty1. Regards, Chris
  10. Just a small personal opinion, but I would use for 2 menu options an if(select()) like: if(select("Yes:No") == 1) { //Yes } else { //No } Better than using an switch, but like I said, personal opinion. ? Regards, Chris
  11. mes "Select Equipment to Craft."; for (.@i = 1; .@i < getarraysize(.itemID); .@i++) .@menu$ = .@menu$ + "~ "+ getitemname(.itemID[.@i]) + ":"; set .@n,select( .@menu$) - 1; next; // By seting the .@n via the menu already you don't need the switch anymore // So I removed the switch itself as well the extra .@n = x; // I also removed in the .itemID array the 0 and added [0] just for my personal preference xD mes "Item Preview: <ITEM>"+getitemname(.itemID[.@n])+"<INFO>"+.itemID[.@n]+"</INFO></ITEM>"; mes "===================="; for(.@i = 0; .@i < getarraysize(.reqItemID1); .@i++) mes "^FF0000"+countitem(.reqItemID1[.@i])+"^000000 / "+.reqItemQty1[.@i]+ " ~ "+getitemname(.reqItemID1[.@i]); mes "^FF0000"+callfunc("F_InsertComma",Zeny)+" / "+callfunc("F_InsertComma",.Zeny[.@n])+" Zeny"; next; mes "Do you wish to continue?"; switch(select("Let me think about it: Yes, create item.")){ case 1: mes "Come back anytime"; close; case 2: if(Zeny <= .Zeny[.@n]){ mes "You have insufficient Zeny!"; close;} for( .@i = 0; .@i < getarraysize(.reqItemID1); .@i++) if(countitem(.reqItemID1[.@i]) < .reqItemQty1[.@i]){ mes "You have insufficient items"; close; } for( .@i = 0; .@i < getarraysize(.reqItemID1); .@i++){ delitem .reqItemID1[.@i],.reqItemQty1[.@i];} Zeny -= .Zeny[.@n]; getitem .itemID[.@n],1; mes "Here you go!"; close; } // mini case end OnInit: setarray .itemID[0],2589, 18600; setarray .Zeny[0],50000000,20000000; //item requirement for each items //Fallen Angel Wing setarray .reqItemID1[0], 2573, 7441,916,949, 1039, 7063,7511,983,982; setarray .reqItemQty1[0], 1, 300, 300, 300, 300, 100, 50, 20, 20; //Cat Ear Beret setarray .reqItemID2[0], 5172, 714, 5057, 919, 7161, 1059, 983; setarray .reqItemQty2[0], 1, 1, 1, 100, 200, 200, 5; end; } Here you go, the corrected menu read the // comments what I did xD Regards, Chris
  12. If you want to get index 0 just add -1 after select(.@menu$) so it looks like this switch(select(.@menu$)-1) That way you can use index 0 as well, but you need to use case 0: too. Best way for this kind of menu would be like this: set .@n,select(.@menu$) - 1; Then remove the switch stuff and just use the .@n for the index. I'm at work right now, so I can't post an full example. When I'm done, I can write it better. But you could check my scripts a example. Regards, Chris
  13. I think it is, since you can use the char id. But did you try to save the value in an variable or try use mes checkquest since it returns an value, see the example of crazyarashi. Regards, Chris
  14. - script MonsterKill -1,{ OnNPCKillEvent: if( getmonsterinfo(killedrid, MOB_MVPEXP) ) { announce "Citizen of midgard, The Brave Adventurer "+ strcharinfo(0)+" has killed the MVP Monster "+getmonsterinfo(killedrid,0)+" at "+strcharinfo(3),0,0xFFFF00; } end; } I think typo : announce +" also an end was missing, which isn't important in this case but still to be sure. Also about the Drop Announce, I think that has to be done via conf/battle/drops.conf: Not sure if there is any other way to do it. Regards, Chris
  15. You know that this command lists you're whole inventory? And that you're check won't work that way? I'm currently at work so I can't really script any correction, but try to use the variable inventorylist_id for your checks instead of saving the equipment in an array, also there is the variable inventorylist_equip which is set based if the equipment is equipped or not.
  16. Nope because the player who killed someone is already attached to the script. Which means you can call other commands like strcharinfo() and so on
  17. Making the mob can't die isn't possible I think.
  18. In my opinion, that's pretty difficult to script: 1. You would have to disable the drop on the respective map. 2. Read the drops of the mob and generate the drop chance based on the server settings. 3. Save the drop via sql for the party and then give the loot according the previous calculation to the party members. 4. Best way what I could think of would be after the dungeon run to give the loot which was dropped, cuz to give it during the run would take too much time or make it so automatically by defining the preferences of the party members beforehand. 5. I would make an setting before the run to decide how the loot will be given, like mentioned before. This includes the preferences too of course. 6. Party leader would have an advantage over the members if he would also gain every item which will be distributed. 7. Overall I think it's doable and not a bad idea. But what would be the party setting Even Share be for.... Regards, Chris
  19. Not directly. OnPCKillEvent attaches the player which killed someone, while setting the variable killedrid to the player who died, in case you want to use the rid. OnPCDieEvent attaches the player which died, while setting the variable killerrid to the killer(can be a monster too)
  20. You could take a look at my script: https://github.com/llchrisll/lllchrislll-scripts/blob/master/released/pvp-gvg-mvp.txt It might not be the best example but still. Regards, Chris
  21. Add end; after setarray then it should work. You don't get the error when login in, you get it when the server starts cuz of an missing end; at OnInit. The server continues afterwards what it shouldn't. Regards, Chris
  22. This would be the wrong section I guess, you have to in the database section. Since I don't exactly know how to make an box item, I can't really help you. But I think there is an extra file for that in the db folder, which defines which items can be received. Best you look up an box item like the Old Violet Box or so. Regards, Chris
  23. If I understand correctly, you want to add repair everything? Add the end repairall; Before the } Regards, Chris
×
×
  • Create New...