Jump to content

pajodex

Members
  • Posts

    439
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by pajodex

  1. View File Prevent hitting mobs near NPC or Warper Hi, It's been a while since I posted anything.. As of now, I want to release this simple src mod that prevents players from hitting MVPs near an NPC/Warper. Purpose of this is to discourage players from going near warpers while hunting MVPs. I'm not sure how helpful this be but I just want to do something small for a while . I will be lurking around the request section to see some good ideas and might be releasing them here after! Cheers! Submitter pajodex Submitted 02/04/2023 Category Source Modifications Video Content Author pajodex  
  2. Look for this on src/map/atcommand.cpp: /*========================================== * @me by lordalfa * => Displays the OUTPUT string on top of the Visible players Heads. *------------------------------------------*/ ACMD_FUNC(me) { char tempmes[CHAT_SIZE_MAX]; nullpo_retr(-1, sd); memset(tempmes, '\0', sizeof(tempmes)); memset(atcmd_output, '\0', sizeof(atcmd_output)); if (sd->sc.cant.chat || (sd->state.block_action & PCBLOCK_CHAT)) return -1; //no "chatting" while muted. if (!message || !*message || sscanf(message, "%255[^\n]", tempmes) < 0) { clif_displaymessage(fd, msg_txt(sd,1302)); // Please enter a message (usage: @me <message>). return -1; } + if ( sd->fakename[0] ) + sprintf(atcmd_output, msg_txt(sd,270), sd->fakename, tempmes); // *%s %s* + else sprintf(atcmd_output, msg_txt(sd,270), sd->status.name, tempmes); // *%s %s* clif_disp_overhead(&sd->bl, atcmd_output); return 0; } Where the '+' are the lines you need to add incase you didnt know.
  3. Try this, tested on latest git on its basic functionality. Let me know if there are any problems. @blockbc - blocks broadcasts depending on the parameter set @unblockbc - as the name suggest 0001-blockbc-command.patch
  4. Version 1.0.0

    145 downloads

    Hi, It's been a while since I posted anything.. As of now, I want to release this simple src mod that prevents players from hitting MVPs near an NPC/Warper. Purpose of this is to discourage players from going near warpers while hunting MVPs. I'm not sure how helpful this be but I just want to do something small for a while . I will be lurking around the request section to see some good ideas and might be releasing them here after! Cheers!
    Free
  5. This is based on NovaRO's Low Rank Hunt feature. All information are based on https://www.novaragnarok.com/wiki/Low_Rank_Hunts and some videos in youtube that I can find. FYI, Everything is made by me (aside from the concept).. no hate and just enjoy ? Thanks! This is my coming back from hiatus update!
  6. Lifeskill System Hi again! Been a while since I posted here. Anyways, without further ado... I'm showcasing my Lifeskill System's Basic Functionality. I am just showing the basic ones because I am too lazy to show everything. If I did, it'll take maybe 10-15mins video, so I just trimmed it down and showed the basic functionality. This system is inspired by Black Desert Online's Life skill system.. Since I played BDO for quite long, I was very inspired to make a version of this to Ragnarok as close as I could get with my own personal twist and take. <> <> Gathering Lifeskill Mining Hunting Lumbering Fishing (not shown but you can only fish on map cell with water - No NPC interaction ) These lifeskills are used to 'gather' materials from mobs. When you use/equip an inappropriate tool, you cannot attack the mob (sample is when you are using a pickaxe, you cannot attack a Hunting Mob/Lumbering Tree and so on). Processing Lifeskill Cooking Scribing Crafting These lifeskills are used to 'craft' items you've gathered in gathering. Lifeskill Tool Lifeskill tools are used in different lifeskill. You cannot use the tool on wrong mobs or craft the item. Same goes for its functionality as per my personal preference. Everytime you use the tool, it loses its durability. When it reaches to zero, you cannot use the tool, so you should repair it thru Tool Shop NPC (Not shown on the video). You can also enchant and refine these tool but only by using the Tool Shop NPC and nothing else. It couldn't be refined by any other npc. Energy System Energy system is used to limit the usage of this system. Players cannot perform any action if they don't have enough energy. Performing any action related to lifeskill system will consume energy. Energy will be replenished when player stays in game per min.
  7. - script vip_info -1,{ OnVIPInfo: if (!vip_status(VIP_STATUS_ACTIVE)) { dispbottom "You are not a VIP member. You may purchase one at Cash Shop.",0xff0000; end; } dispbottom "VIP Time Left: "+ Time2Str(vip_status(VIP_STATUS_REMAINING)+gettimetick(2)),0x5cdcff; end; OnInit: bindatcmd "vipinfo", strnpcinfo(0)+"::OnVIPInfo"; }
  8. Hi, As the title speak (I have asked this over discord), how do I retrieve data from a custom sql table ROA_VALUE so that a custom random option will update everytime the data is also updated. I have tried using `setrandomoption` and it is working .However I find it a hassle to look at everytime I update it via script command because the item is unequipped then re-equipped.. Maybe little hints might be great.. *Im not sure if im posing on right section but kindly move it if it isn't. Thank you ?
  9. Lots of guides available in the forum and wiki. Otherwise, check third-party services.
  10. Edited my first post.. I accidentally put ".@MaxBLeve" instead of ".@MaxBLevel"
  11. add this if(getequiprefinerycnt(.@part) < 10) failedrefitem .@part // if refine is less than +10... item will break.. above Line 166: specialeffect EF_CURSEATTACK;
  12. payo2,75,115,5 script Race to 99 Reward NPC 99,{ .@MaxBLevel = 99; //Set your servers max base level here. .@MaxJLevel = 50; //Set your servers max job level here. setarray .@item, // set rewards 6046, 3, // <ID>, <AMT> 7539, 25, 23025, 1, 23034, 1; if ( LReward ) { // checks if you already get the reward. mes "No more rewards."; close; } if(BaseLevel < .@MaxBLevel && JobLevel < .@MaxJLevel ) { mes "You don't have the required level yet."; mes "Come back when you reached it - Base Level "+.@MaxBLevel+" - Job Level "+.@MaxJLevel+"!"; close; } mes "Congratulations, you've reached the max level in the server, here's your reward!"; close2; LReward = true; // sets LReward to true which means you already get your item. for(.@i=0;.@i<getarraysize(.@item);.@i+=2) getitem .@item[.@i], .@item[.@i+1]; end; }
  13. Thanks buddy, I will try this There finally working, I was using the same diff before. But I think I have missed a line when I implemented it. Thanks for a better and clearer copy
  14. Anyone who has a latest @costumeitem script command diff that's working with latest server file? Thanks
  15. // Note: the character needs to have the skill MC_PUSHCART to gain a cart prontera,149,180,0 script Cart Select 100,{ // zeny cost of cart. setarray .@cart_cost[1], 100, // cart 1 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200; // cart 12 if (!checkcart()) { mes "You must have a cart."; close; } mes "Choose a cart:"; next; .@menu$ = ""; for (.@i=1; .@i<13; .@i++) { .@menu$ += "Cart #"+.@i; .@menu$ += ":"; } .@s = select(.@menu$); mes "You selected Cart #"+ .@s; mes " "; mes "Cost price is "+ F_InsertComma(.@cart_cost[.@s]) +"z."; next; if(select("Yes","No")==2) close; if (Zeny < .@cart_cost[.@s]) { mes "Not enough zeny,"; close; } Zeny -= .@cart_cost[.@s]; setcart .@s; mes "Goodluck!"; close; }
  16. Or you can enable the use of @cart to players instead
  17. Sorry, I wont support this script nor attend request on this anymore. Since this is a free release, feel free to edit it.
  18. Script-wise, yes maybe.. once they get the title. attachnpc timer to player. after an hour, remove the achievement.. *achievementremove(<achievement id>{,<char id>}) This function will remove an achievement from the player's log for the attached player or the supplied <char id>. Returns true on success and false on failure.
  19. // Disclaimer : // Yes this code is from example 2 of script_commands.txt prontera,150,180,0 script PvP Party Warper 100,{ .@pvpmap$ = "guild_vs1"; // Pvp map .@register_num = 45; // How many party members are required? getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; if ( !getcharid(1) || $@partymembercount != .@register_num ) { mes "Please form a party of " + .@register_num + " to continue"; close; } for ( .@i = 0; .@i < $@partymembercount; .@i++ ) if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) .@count_online++; if ( .@count_online != .@register_num ) { mes "All your party members must be online to continue"; close; } copyarray .@partymembercid, $@partymembercid, .@register_num; mes "Are you ready ?"; next; select("Yes"); getpartymember getcharid(1), 1; if ( $@partymembercount != .@register_num ) { mes "You've made changes to your party !"; close; } for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( .@partymembercid[.@i] != $@partymembercid[.@i] ) { mes "You've made changes to your party !"; close; } } warpparty .@pvpmap$, 0,0, getcharid(1); end; }
  20. shop custom_seller21 -1,673:1000000 // Create our dummy shop. prontera,150,150,4 script [Máquina Cartas] 564,{ // This code runs when the user clicks our npc. mes "[^FF2400Cuidado^000000] Escolha um item!"; // Let the user know about our shop. callshop "custom_seller21",1; // Summon our dummy shop filled with custom items. npcshopattach "custom_seller21"; // Attach the shop to this npc. end; // This code runs when a user purchases an item from out shop. OnBuyItem: .@len = getarraysize(.customs); // Get the number of customs we're adding. .@b_len = getarraysize(@bought_nameid); // Get the number of purchased items. for( set @i, 0; @i < .@len; set @i, @i+1 ) { for( set @d,0; @d < .@b_len; set @d, @d+1 ) { if( @bought_nameid[@d] == .customs[@i] ) { // Check if the purchased item equals our custom item. if( countitem(.CoinID) >= .Price[@i] * @bought_quantity[@d] ) { // Check if the user has the correct funds. delitem .CoinID,.Price[@i]*@bought_quantity[@d]; getitem @bought_nameid[@d],@bought_quantity[@d]; } } } } deletearray @bought_quantity, getarraysize(@bought_quantity); // Remove the array. deletearray @bought_nameid, getarraysize(@bought_nameid); // Remove the array. close; // Npc walks every 10 sec OnTimer10000: .@x = .npc_x + rand( -10,10 ); .@y = .npc_y + rand( -10,10 ); npcwalkto .@x,.@y; setnpctimer 0; end; // This code runs first. When the server is started. OnInit: setarray .customs[0],4035,4060,4063; // An array of out custom items. set .CoinID,1226; // ID da Moeda em uso. setarray .Price[0],500,500,500; // The amount of coins needed for our items. (For example: Item 12103 = 20 coins) npcshopitem "custom_seller21",0,0; // Remove all items from our dummy shop. for( set .@i, 0; .customs[.@i]; set .@i, .@i+1 ) // Loop through our custom items. npcshopadditem "custom_seller10",.customs[.@i],.Price[.@i]; // Add our custom items to the cleared dummy shop. npcspeed 200; getmapxy( .npc_map$, .npc_x, .npc_y,1 ); initnpctimer; end; end; }
  21. *npcspeed <speed value>; *npcwalkto <x>,<y>; *npcstop; These commands will make the NPC object in question move around the map. As they currently are, they are a bit buggy and are not useful for much more than making an NPC move randomly around the map. 'npcspeed' will set the NPCs walking speed to a specified value. As in the @speed GM command, 200 is the slowest possible speed while 0 is the fastest possible (instant motion). 100 is the default character walking speed. 'npcwalkto' will start the NPC sprite moving towards the specified coordinates on the same map it is currently on. The script proceeds immediately after the NPC begins moving. 'npcstop' will stop the motion. While in transit, the NPC will be clickable, but invoking it will cause it to stop moving, which will make its coordinates different from what the client computed based on the speed and motion coordinates. The effect is rather unnerving. Only a few NPC sprites have walking animations, and those that do, do not get the animation invoked when moving the NPC, due to the problem in the NPC walking code, which looks a bit silly. You might have better success by defining a job- sprite based sprite id in 'db/mob_avail.txt' with this. Then add npctimers..
×
×
  • Create New...