Jump to content

Kurofly

Members
  • Posts

    283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Kurofly

  1. Oh yeah I forgot to ask, what's your client date? (wanna put item link ^^) 'Sup there I'm on it, do you want players to receive rewards when they complete the first part? (killing 80 shinobi and 20 ancient trees) do I consider the quest failed when all the players are dead in pal_dun02? If not, do the monsters regain their health when everybody dies? do you want players to be able to go back to pal_dun02 if they die? Is pal_dun02 a big map? If yes do you want players to locate the MVPs on this map? Wow I just saw the MVPs you spawn, they're gonna have a hard time if they're only 2 in the party xD that's a bit like "hey, you killed some Shinobi, that's great! Now go kill Satan Morocc, Thanatos and Baphomet!" Since there's quite a gap in difficulty between part 1 and 2 don't you want to set the amount of players needed to a higher value? Or change something in the quest? Still have one question and that should be it. In case you reloadscript when players are doing the quest, do you want to give them the rewards as an apologize? If yes do they need to be at a certain point before getting rewards on reload? For example I can give rewards if players have already killed one of the MVPs in part 2 when the scripts are reloaded, or even if they killed 10 shinobi I don't know, whatever you want ^^
  2. Challenge accepted! (can't start before 2 days though )
  3. xD hopefully you're here I totally forgot about the job exp!
  4. Maybe you're spawning on a bugged map, try to change your 'last_pos', 'last_x' and 'last_y' in your mysql database (char table) to another location
  5. There's no wrong way, no pain no gain Just to let you know, the 3 mobs error occurs because the script is not ended before the mob death label. ... monster "pal_dun02",0,0,"Kalnor Keeper of the Realms",1917,1,strnpcinfo(1)+"::OnMobKilled"; // should be an 'end;' there, otherwise the script continue and the variable '.mob' decrements. //=================================================================== OnMobKilled: .mob--; ... Gonna do that either this evening or tomorrow evening, depends on whether I get a call that I really don't wanna get this evening or not ^^ I'm not a fan of instances, I find it overly complicated and it's a really bad way to learn things so I'm gonna do it the original way. Don't worry it'll have nothing to envy to instances. Just one last thing, don't you want each party that has done the quest to have a delay of 2 hours instead of all the parties? Because if you ask them to kill mobs for 30 minutes and then the quest becomes unavailable because someone else did it that'd be a shame ^^ See you
  6. Yes that's it (although id 1249 is not a poring ^^)
  7. Did you try changing the location of your folder? It happened to me before (not with ro though).
  8. Hi 101,82 is not a correct cell for the map iz_int02 so the npc 'Freebies' can't be placed. Since the one in prontera is a duplicate of this one, it also can't appear.
  9. getstatus(SC_TRANSFORMED) It returns 1 if the status is active.
  10. Oops .@delay = 60*60*12 - (gettimetick(2) - #lastTimeTalked); -- .@hours = .@delay / 60*60; ++ .@hours = .@delay / (60*60); .@minutes = (.@delay - (.@hours*60*60)) / 60; .@seconds = (.@delay - (.@hours*60*60) - (.@minutes*60)); mes "Sorry, you have to wait "+.@hours+" hour"+(.@hours>1?"s":"")+" "+.@minutes+" minute"+(.@minutes>1?"s":"")+" "+.@seconds+" second"+(.@seconds>1?"s":"")+" to claim your free supplies again.";
  11. Hello You have one bracket you shouldn't have, the timer is out of the script ^^ Since it's a bit messy and I don't really know where you wanted to close your brackets, here is another one (a bit easier too): - script PK Point System -1,{ OnPCKillEvent: if(strcharinfo(3) != "pvp_n_2-5") end; if(@LastKilled == killedrid) end; set .@Killer,getcharid(3); set .@Killed,killedrid; // not useful anymore, can use 'killedrid' set #PKPOINTS,#PKPOINTS+3; dispbottom "You Gained 3 PK Point from "+rid2name(.@Killed); dispbottom "Current PK Points : "+#PKPOINTS; set @LastKilled,.@Killed; addtimer 180000,strnpcinfo(0)+"::OnAntiSpamReset"; if(attachrid(.@Killed) && #PKPOINTS > 2){ // even though I don't see a reason for the killed player not to be attached set #PKPOINTS,#PKPOINTS-2; dispbottom "You Lost 2 PK Point from "+rid2name(.@Killer); dispbottom "Current PK Points : "+#PKPOINTS; } end; OnAntiSpamReset: set @LastKilled,0; end; } There are a lot of pvp ladders in rA, if you want to add more features take a look at them, I'm pretty sure you'll find a lot of nice things.
  12. There you go .@delay = 60*60*12 - (gettimetick(2) - #lastTimeTalked); .@hours = .@delay / 60*60; .@minutes = (.@delay - (.@hours*60*60)) / 60; .@seconds = (.@delay - (.@hours*60*60) - (.@minutes*60)); mes "Sorry, you have to wait "+.@hours+" hour"+(.@hours>1?"s":"")+" "+.@minutes+" minute"+(.@minutes>1?"s":"")+" "+.@seconds+" second"+(.@seconds>1?"s":"")+" to claim your free supplies again."; Not tested See you
  13. Hi here's your script <map>,<x>,<y>,<pos> script <name of your npc> <sprite id>,{ .@name$ = "[^0066ff"+strnpcinfo(0)+"^000000]"; if (ExpBonusGiven) { mes .@name$,"I already gave you a bonus, can't give you more!" ; close; } if (BaseLevel >= 75) { mes .@name$,"Sorry but I'm not allowed to give exp boost to players level 75 or higher!" ; close; } mes .@name$,"Hello there, since you are under level 75 I can give you an exp bonus for the next 24 hours." ; next; mes .@name$,"Do you want to enable the exp bonus now?"," ~ ^0000fflasts 24 hours^000000"," ~ ^ff0000only available under the level 75^000000" ; next; if (select("Not now:Sure I want!") == 1) close; ExpBonusGiven = 1; sc_start SC_EXPBOOST,24*60*60*1000,400; mes .@name$,"There you go, make good use of that bonus!"; close; } If you need anything else, you now where to ask Welcome to rAthena! Glad to see a new face here (too many oldies there ^^)
  14. Hey there! You can attach players of a party by adding this command before the messages: addrid(2,0,getcharid(1)); You also can use this to only attach the party leader: .@party_leader_id = getpartyleader(getcharid(1),1); detachrid; attachrid(.@party_leader_id); Make sure he's logged in to prevent the script from bugging! Or if it's just in order to give items you can use the 'addrid' command and check whether the player is the leader at the moment you give items. Sorry but looking at your script there are several things that seems wrong to me, can you tell me a bit more about those? Is it supposed to be an instanced quest? Because if this is one you need to create it and if it's not you need to forbid players from doing it unless the previous party has finished the quest, otherwise there is a chance from monsters to spawn several times. You don't kill the third monster when the quest is completed, is that normal? The 'OnPCLoadMapEvent' label have many errors. You first need to check if the player entering the map is in the party doing the quest. You also have to check if he's in the right map because this label will be triggered on every map that has the 'mf_loadevent' mapflag. Finally you need to spawn the monsters only once because each player entering the map will make 3 monsters spawn. I can fix those for you but I need you to answer a few questions: Is it supposed to be an instanced quest? Or do you want only one party to be able to do the quest at a time? Is there something that players have to do before being allowed to do the quest? If yes, what? What is the map the 'OnPCLoadMapEvent' label should trigger? Anything else you need me to know? ^^ Also if you want to add any feature don't hesitate to ask, that's what we're here for ^^ Take care
  15. Ok I got it! src/map/clif.c void clif_parse_cashshop_open_request( int fd, struct map_session_data* sd ){ sd->npc_shopid = -1; // Set npc_shopid when using cash shop from "cash shop" button [Aelys|Susu] bugreport:96 clif_cashshop_open( sd ); ++ npc_script_event(sd, NPCE_CASHSHOP); } In any npc: - script dubnpc -1,{ OnCashShopOpening: debugmes "it works!!"; end; } Tested and working I edited my first post too so that everything's in one post
  16. You could add an event label and then call it when opening the shop. Let's say you want to create a label named 'OnCashShopOpening' (yeah should think about something else ^^) src/map/npc.c : void npc_read_event_script(void) { int i; struct { char *name; const char *event_name; } config[] = { {"Login Event",script_config.login_event_name}, {"Logout Event",script_config.logout_event_name}, {"Load Map Event",script_config.loadmap_event_name}, {"Base LV Up Event",script_config.baselvup_event_name}, {"Job LV Up Event",script_config.joblvup_event_name}, {"Die Event",script_config.die_event_name}, {"Kill PC Event",script_config.kill_pc_event_name}, {"Kill NPC Event",script_config.kill_mob_event_name}, {"Stat Calc Event",script_config.stat_calc_event_name}, ++ {"Cash Shop Event",script_config.cash_shop_event_name}, }; src/map/npc.h : //Script NPC events. enum npce_event { NPCE_LOGIN, NPCE_LOGOUT, NPCE_LOADMAP, NPCE_BASELVUP, NPCE_JOBLVUP, NPCE_DIE, NPCE_KILLPC, NPCE_KILLNPC, NPCE_STATCALC, ++ NPCE_CASHSHOP, NPCE_MAX }; src/map/script.c : struct Script_Config script_config = { 1, // warn_func_mismatch_argtypes 1, 65535, 2048, //warn_func_mismatch_paramnum/check_cmdcount/check_gotocount 0, INT_MAX, // input_min_value/input_max_value "OnPCDieEvent", //die_event_name "OnPCKillEvent", //kill_pc_event_name "OnNPCKillEvent", //kill_mob_event_name "OnPCLoginEvent", //login_event_name "OnPCLogoutEvent", //logout_event_name "OnPCLoadMapEvent", //loadmap_event_name "OnPCBaseLvUpEvent", //baselvup_event_name "OnPCJobLvUpEvent", //joblvup_event_name "OnPCStatCalcEvent", //stat_calc_event_name "OnTouch_", //ontouch_name (runs on first visible char to enter area, picks another char if the first char leaves) "OnTouch", //ontouch2_name (run whenever a char walks into the OnTouch area) ++ "OnCashShopOpening", }; src/map/script.h : extern struct Script_Config { unsigned warn_func_mismatch_argtypes : 1; unsigned warn_func_mismatch_paramnum : 1; int check_cmdcount; int check_gotocount; int input_min_value; int input_max_value; const char *die_event_name; const char *kill_pc_event_name; const char *kill_mob_event_name; const char *login_event_name; const char *logout_event_name; const char *loadmap_event_name; const char *baselvup_event_name; const char *joblvup_event_name; const char *stat_calc_event_name; const char* ontouch_name; const char* ontouch2_name; ++ const char* cash_shop_event_name; } script_config; src/map/clif.c void clif_parse_cashshop_open_request( int fd, struct map_session_data* sd ){ sd->npc_shopid = -1; // Set npc_shopid when using cash shop from "cash shop" button [Aelys|Susu] bugreport:96 clif_cashshop_open( sd ); ++ npc_script_event(sd, NPCE_CASHSHOP); } In any npc: - script dubnpc -1,{ OnCashShopOpening: debugmes "it works!!"; end; } Tested and working I don't know if there's a way to call a specific npc event or even to call a script function, sorry but I don't know much about src at all so that's all I've got.
  17. Do you really move slower? Judging from the npc position it seems to be mine and you shouldn't since the skill is given level 10.
  18. You're actually the first one to tell me something like this, even I don't think this way The only reason I script in such a heavy and eyes bleeding way is that having everything in the shortest space makes me able not to forget things. I know very well people would have a hard time reading it but if I did otherwise I would definetely forget things ^^ Really nice script, I like the way it's done, I've actually never read the kafra script but it seems it's very well done! Just a few notes: F_checkRequirements(6,... ... // Arg(0): flag (bit field) // 1 - Ensure that the class wanting to rent a pushcart is a class listed in the second arg ... if (getarg(0) & 1) { if (!.size) { explode(.class_id, getarg(1), ":"); set .size, getarraysize(.class_id); } for (set .@i, 0; .@i < .size; set .@i, .@i + 1) { if (Class == .class_id[.@i]) { set .@checked, 1; break; } } if (!.@checked) { mes "[Sophia]"; mes "I'm sorry, but the Pushcart rental service is not available for your class."; return 0; } } What's the point if you don't put the 1 bitmask? xD Also you can't set an integer array using the explode command cause it will return strings, I checked it just in case and your '.class_id' array is always empty if (getarg(0) & 4) { if (!getskilllv("MC_PUSHCART")) { mes "[Kafra Employee]"; mes "You can only rent a cart after learning the \"Push Cart\" skill."; return 0; } } She will always tell you that you don't have the skill, you don't give it ^^
  19. Hey guys, I made one too ^^ (that looked interesting) My npc is a little bit less gentle prontera,150,184,4 script cart_npc 73,{ .@name$ = "[ ^0066ffcart giver^000000 ]"; // in case the skill is lost for some reason if (CartType && !getskilllv(39)) { mes .@name$,"Oh my, you lost the skill!","Sorry for this, I'm giving it back right away!" ; skill 39,10,3 ; setcart CartType ; close; } if (Class == 5 || Class == 10 || Class == 18 || Class == 4005 || Class == 4010 || Class == 4018 || Class == 4028 || Class == 4032 || Class == 4040 || Class == 4057 || Class == 4063 || Class == 4071 || Class == 4078 || Class == 4085 || Class == 4086 || Class == 4106 || Class == 4111) { mes .@name$,"Tryin' to fool me, ain't you? Like you even need me.." ; close; } mes .@name$,"Hi there! I'm the cart giver!"; mes "I can give you a cart for a few <ITEMLINK>tokens<INFO>7227</INFO></ITEMLINK> if you want"," "; mes "Do want want a cart?"; if (CartType) mes "Or remove it maybe? Don't worry you can get it back anytime whithout paying."; next; if (select("Hell yeah!:What? No") == 2) close; mes .@name$,"Buying a cart is worth ^0000ff1000^000000 <ITEMLINK>tokens<INFO>7227</INFO></ITEMLINK>"; mes "Changing its type is worth ^0000ff100^000000 <ITEMLINK>tokens<INFO>7227</INFO></ITEMLINK>"," "; mes "You can see the cart types <URL>here<INFO>https://www.google.be/imgres?imgurl=http%3A%2F%2Fimage.noelshack.com%2Ffichiers%2F2016%2F10%2F1457361787-new-carts.png&imgrefurl=http%3A%2F%2Fwww.aurora-odin.de%2F&docid=77fw6-EyusBFrM&tbnid=KR15X3SNwU_kgM%3A&w=383&h=191&bih=775&biw=1600&ved=0ahUKEwigm_nNleLNAhVJPRoKHVzNDbsQMwgfKAMwAw&iact=mrc&uact=8</INFO></URL>" ; next; if (!CartType) { if ((.@select = select("Buy cart:Change type:Leave")) == 3) close; } else if (!checkcart()) { if ((.@select = select("Get cart back:Leave")) == 2) close; } else { if ((.@select = select("Buy cart:Change type:Remove cart:Leave")) == 4) close; } if (.@select == 1) { if (CartType && !checkcart()) { setcart CartType ; mes .@name$,"There you go again, enjoy!" ; close; } if (CartType && checkcart()) { mes .@name$,"You already have a cart, don't you?" ; close; } if (countitem(7227) < 1000) { mes .@name$,"You don't have enough tokens! Like I'd do that for free.","Come back when you can pay me hehe." ; close; } delitem 7227,1000; if (!CartType) skill 39,10,3; // are you supposed to loose it at some point?? setcart 1 ; CartType = 1; mes .@name$,"There you go, enjoy your new cart!"; close; } else if (.@select == 2) { if (!CartType) { mes .@name$,"You don't even have a cart! Come back when your brain is working again hehe." ; close; } if (countitem(7227) < 100) { mes .@name$,"You don't have enough tokens! Like I'd do that for free.","Come back when you can pay me hehe." ; close; } mes .@name$,"Sure, which cart would you like?","","Here is the list of <URL>carts<INFO>https://www.google.be/imgres?imgurl=http%3A%2F%2Fimage.noelshack.com%2Ffichiers%2F2016%2F10%2F1457361787-new-carts.png&imgrefurl=http%3A%2F%2Fwww.aurora-odin.de%2F&docid=77fw6-EyusBFrM&tbnid=KR15X3SNwU_kgM%3A&w=383&h=191&bih=775&biw=1600&ved=0ahUKEwigm_nNleLNAhVJPRoKHVzNDbsQMwgfKAMwAw&iact=mrc&uact=8</INFO></URL>" ; next; if ((.@select = select("cart 1 : cart 2 : cart 3 : cart 4 : cart 5 : cart 6 : cart 7 : cart 8 : cart 9 : leave")) == 10) close; if (.@select == CartType) { mes .@name$,"You already have that one, don't waste your tokens like that.." ; close; } delitem 7227,100; setcart .@select ; CartType = .@select; mes .@name$,"There you go, enjoy your new cart!"; close; } else { if (!checkcart()) { mes .@name$,"You don't even have one.." ; close; } setcart 0; mes .@name$,"There you go, see you soon!"; close; } } @DutchDuck I'm used to put item links everywhere but I didn't ask if your client supports it, tell me if it works May I know why you want to make everyone able to have carts? (I'm quite curious ^^) @ Okuz the 'setcart' script command alone doesn't work unless you have the pushcart skill (id: 39), you need to add it if you want to make it work. The problem with this skill is that you can't set it permanently unless you have the required class. Although setting it temporarly should work since it's supposed to be used in item scripts so that shouldn't be much of a problem. I added a few checkings that you don't have, not sure they're very useful though ^^ forbid merchant classes to use that script (so that they don't use it to gain skill points or whatever) made impossible for players who already have a cart to buy it twice, can't change the type to your current type either (people don't like wasting money/items ^^) made people able to remove their carts and get it back with no fees (having a cart is not always useful) added a checking in case the skill is removed for some reason (that should solve the temporay skill setting for this case) Ahh I should put some emotions too, I never do that and it's so nice! Take care
  20. use the 'atcommand' script command *atcommand "<command>"; This command will run the given command line exactly as if it was typed in from the keyboard by the player connected to the invoking character, and that character belonged to an account which had GM level 99. // This will ask the invoker for a character name and then use the '@nuke' // GM command on them, killing them mercilessly. input @player$; atcommand "@nuke "+@player$; Note that for atcommands bound using 'bindatcmd', this command will execute the original atcommand, not the script-bound atcommand.
  21. There you go pallene,164,145,5 script Leveling Room 84,{ .@name$ = "[^0066ffLeveling Room^000000]"; mes .@name$,"Gnar Gnar Gnar..." ; next; mes .@name$,"I can bring you to a place where you can gain levels a easy way.."; mes "what do i get in return? well when choosing this way of levelling.. it shows that youre are weak!"; mes "and thats something I love!" ; next; mes .@name$,"In order to get you there, it will cost you:"; mes " ~ 300 <ITEMLINK>"+getitemname(7227)+"<INFO>"+7227+"</INFO></ITEMLINK>"; //mes " ~ 300 "+getitemname(7227); // in case the item link is not available in your client mes " ~ 500 000 zeny"; mes " Minimum Level required: 150"; next; if (select("Proceed:Leave") == 2) end; if (countitem(7227) < 300 || Zeny < 500000 || BaseLevel < 150) { mes .@name$,"come again when you decide to let the shadow realm inside youre head Muahahah~" ; close; } mes .@name$,"Goood... Let the ShadowRealm take you there so you can start leveling the weak way!"; mes "but remember.... if you die.... you will have to bring me the money and the cards all over..."; mes "Still want to go?"; if (select("Yes because I'm weak!:No leave me alone!") == 2) end; delitem 7227,300; Zeny -= 500000; warp "pvp_y_1-2",0,0; end; OnInit: monster "pvp_y_1-2",0,0,"Leveling Barricade",1905,50,"Leveling Room::OnLevelUp"; monster "pvp_y_1-2",0,0,"Leveling Barricade",1905,50,"Leveling Room::OnLevelUp"; monster "pvp_y_1-2",0,0,"Leveling Barricade",1905,50,"Leveling Room::OnLevelUp"; monster "pvp_y_1-2",0,0,"Leveling Barricade",1905,50,"Leveling Room::OnLevelUp"; monster "pvp_y_1-2",0,0,"Leveling Barricade",1905,50,"Leveling Room::OnLevelUp"; end; OnLevelUp: atcommand "@blvl 5"; atcommand "@jlvl 5"; end; } I'm a bit in a rush so I didn't had any color. It's pretty basic don't hesitate to add a bit of colors or anything. Gotta go!
  22. you can't create monsters with id starting from 4000, you need to change the id to a lower value
  23. Oh yeah you're right, you can't do this with the system files >< Try to add your custom items in a grf instead, this way you'll be able to encrypt your custom items at least
  24. Just delete it and it'll read the one in the grf instead, I did that to put all of my custom files in one grf
  25. Oh yeah xD you're right. Wow it's been a long time since I added new items, I need to get back to that
×
×
  • Create New...