-
Posts
248 -
Joined
-
Last visited
-
Days Won
19
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Winterfox
-
prontera,147,174,6 script Buff 750,{ if(countitem(.price_id) < .price) { mes "[ Buff ]"; mes "You don't have enough price items."; close; } delitem(.price_id, .price); .@bufflvl = rand(1, 10); switch(rand(3)) { case 1: percentheal(100,100); break; case 2: sc_start(.foodbuff$[rand(getarraysize(.foodbuff$))], 360000, .@bufflvl); break; case 3: .@buffref = rand(getarraysize(.skillbuff$)); skilleffect(.skilleffect[.skilleffect], 0); sc_start(.skillbuff$[.@buffref], 360000, .@bufflvl); break; } end; OnInit: .price_id = 501; .price = 1; setarray(.skilleffect, 384, 383, 378, 465, 464); setarray(.skillbuff, SC_MELTDOWN, SC_WINDWALK, SC_EDP, SC_KAITE, SC_KAUPE); setarray(.foodbuff, SC_ASPDPOTION2, SC_STRFood, SC_AGIFood, SC_VITFood, SC_INTFood); } Here is an example how you could do it. i didn't test it, but it should give you a general idea, how to achieve what you want.
-
The command looks correct. Can you provide the rest of the script to have the full context?
-
prontera,150,150,5 script HourTimer 111,{ end; OnInit: On7200000: initnpctimer; delwaitingroom; waitingroom("" + gettimestr("%H:%M:%S %p",15),0); }
-
Can you show your fishing script?
-
- script hourly_point_main -1,{ OnInit: .npc_name$ = strnpcinfo(3); .reward_minutes = 60; bindatcmd("check", .npc_name$ + "::OnAtcommand"); end; OnAtcommand: dispbottom("Accumulated " + #daily_minute_count); end; OnPCLoginEvent: addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate"); end; OnUpdate: deltimer(.npc_name$ + "::OnUpdate"); addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate"); if (checkvending() & 2) { end; } #daily_minute_count += .reward_minutes; switch(#daily_minute_count) { case 60: // 60 minutes #CASHPOINT += 1; getitem 677,1; break; case 120: // 120 minutes #CASHPOINT += 1; getitem 677,1; break; case 180: // 180 minutes #CASHPOINT += 1; getitem 677,1; break; case 240: // 240 minutes #CASHPOINT += 1; getitem 677,1; break; case 300: // 300 minutes #CASHPOINT += 1; getitem 677,1; break; case 360: // 360 minutes #CASHPOINT += 1; getitem 677,1; break; case 420: // 420 minutes #CASHPOINT += 1; getitem 677,1; break; case 480: // 480 minutes #CASHPOINT += 1; getitem 677,1; #daily_minute_count = 0; // reset. break; default: break; } }
-
Force disable autoloot when enter certain map
Winterfox replied to neokatsuya's question in Script Requests
You can use the nocommand mapflag, to disable the usage of atcommands on the map to prevent the usage of autoloot. izlude mapflag nocommand 80 -
//================================================Name====================================================== // AntiBot (Official Release Name) //===============================================Version==================================================== // 1.0 //===============================================Author===================================================== // ____ _____ ______ __ __ __ _______ __ _____ __ __ _______ // | __ \ _ \| __ \| | \ | |/ ___ \ | | / / | \ | |/ ___ \ // | |__| | \ \ |__| | | \| | | _\_/ | |/ /| | \| | | _\_/ // | __/ | | /| | | | |_ \ | | | | | | | |_ \ // | |\ \_/ / |\ \| | |\ | \_/ | | |\ \| | |\ | \_/ | // |__| \_____/|__| \__\__|__| \__|\______/ |__| \__\__|__| \__|\______/ //----------------------------------------Script Last Update 2020------------------------------------------- //==============================================Changelog=================================================== // 1.0 * // - Initial Release //========================================================================================================== - script Anti Bot -1,{ OnNPCKillEvent: if(getgmlevel() > 0) end; @bot_check_kill_count++; if(@bot_check_kill_count >= rand(100,150)) goto Check; end; Check: setpcblock(PCBLOCK_ALL, true); setoption(0x2, 1); mes "[ ^FF7700Anti Bot^000000 ]"; mes "Bot checking time"; mes "Please input the number you see"; next; .@captcha_number = rand(1,5); switch(.@captcha_number) { case 1: mes "################^83F52C##^000000################"; mes "##############^83F52C####^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "##############^83F52C######^000000##############"; break; case 2: mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "##################^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C#########^000000##############"; break; case 3: mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "##################^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; mes "##################^83F52C##^000000##############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; break; case 4: mes "###################################"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C#########^000000##############"; mes "#################^83F52C##^000000###############"; mes "#################^83F52C##^000000###############"; break; case 5: mes "###########^83F52C########^000000###############"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C#######^000000################"; mes "#################^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "############^83F52C######^000000################"; break; } input @num; if(@num != .@captcha_number) { atcommand("@kick " + strcharinfo(0)); end; } next; mes "[ ^FF7700Anti Bot^000000 ]"; mes "Thank you for your patience, you can now move on."; setpcblock(PCBLOCK_ALL, false); setoption(0x2, 0); @bot_check_kill_count = 0; close; }
-
//================================================Name====================================================== // AntiBot (Official Release Name) //===============================================Version==================================================== // 1.0 //===============================================Author===================================================== // ____ _____ ______ __ __ __ _______ __ _____ __ __ _______ // | __ \ _ \| __ \| | \ | |/ ___ \ | | / / | \ | |/ ___ \ // | |__| | \ \ |__| | | \| | | _\_/ | |/ /| | \| | | _\_/ // | __/ | | /| | | | |_ \ | | | | | | | |_ \ // | |\ \_/ / |\ \| | |\ | \_/ | | |\ \| | |\ | \_/ | // |__| \_____/|__| \__\__|__| \__|\______/ |__| \__\__|__| \__|\______/ //----------------------------------------Script Last Update 2020------------------------------------------- //==============================================Changelog=================================================== // 1.0 * // - Initial Release //========================================================================================================== - script Anti Bot -1,{ OnNPCKillEvent: if(getgmlevel() > 0) end; @bot_check_kill_count++; if(@bot_check_kill_count >= rand(100,150)) goto Check; end; Check: setpcblock(PCBLOCK_ALL, true); setoption(0x2, 1); mes "[ ^FF7700Anti Bot^000000 ]"; mes "Bot checking time"; mes "Please input the number you see"; next; .@captcha_number = rand(1,5); switch(.@captcha_number) { case 1: mes "################^83F52C##^000000################"; mes "##############^83F52C####^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "################^83F52C##^000000################"; mes "##############^83F52C######^000000##############"; break; case 2: mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "##################^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C#########^000000##############"; break; case 3: mes "############^83F52C#######^000000###############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "##################^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; mes "##################^83F52C##^000000##############"; mes "###########^83F52C##^000000#####^83F52C##^000000##############"; mes "############^83F52C#######^000000###############"; break; case 4: mes "###################################"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "###########^83F52C#########^000000##############"; mes "#################^83F52C##^000000###############"; mes "#################^83F52C##^000000###############"; break; case 5: mes "###########^83F52C########^000000###############"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C##^000000#####################"; mes "###########^83F52C#######^000000################"; mes "#################^83F52C##^000000###############"; mes "###########^83F52C##^000000####^83F52C##^000000###############"; mes "############^83F52C######^000000################"; break; } input @num; if(@num != .@captcha_number) { atcommand("@kick " + strcharinfo(0)); end; } next; mes "[ ^FF7700Anti Bot^000000 ]"; mes "Thank you for your patience, you can now move on."; setpcblock(PCBLOCK_ALL, false); setoption(0x2, 0); @kill = 0; close; }
-
//===== Thaddeus Scripts ================================== //= Simple Cool Anti-Bot //===== By: ================================================== //= Thaddeus //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= Hercules, rAthena, 3ceam, eAthena //===== Description: ========================================= // Improvise Simple Anti-Bot! from method of Brian. //===== Comments: ============================================ //= Change the % chance of triggering, change jail time. //===== Additional Comments: ================================= //= 1.00 Initial Release //===== Contact Info: ========================================= //= http://hercules.ws/board/user/457-thaddeus/ //============================================================ //===== Credits to: ========================================= //= Brian, //============================================================ - script ANTIBOT -1,{ function create_code_segment; OnInit: .code_segment_length = 4; .code_segment_count = 3; .jail_duration_days = 10; .max_error_treshold = 3; initnpctimer; end; OnPCLoginEvent: if(bot_check_error_count) { doevent("ANTIBOT::OnBotCheck"); } end; OnTimer1800000: initnpctimer; addrid(0); OnBotCheck: setpcblock(PCBLOCK_ALL, true); OnRetry: for(.@i = 0; .@i < .code_segment_count; .@i++) { .@code$[.@i] = create_code_segment(.code_segment_length); } mes "You Have 3 Chance to Type the Red Text Correctly"; mes "If you failed- You will be jailed"; mes "Input the ^FF0000RED COLOUR^000000 parts"; mes "^FF0000" + implode(.@code$, "^000000^0000FF-^000000^FF0000") + "^000000"; input .@input$; if(.@input$ != implode(.@code$, "")){ bot_check_error_count++; if (bot_check_error_count >= .max_error_treshold) { atcommand("@jailfor " + .jail_duration_days + "d " + strcharinfo(0)); announce("[Anti-BOT]: The user [" + strcharinfo(0) + "] has been jailed for " + .jail_duration_days + " days.", 0, 0xe80f0f); bot_check_error_count = 0; setpcblock(PCBLOCK_ALL, false); end; } mes("You entered the wrong code.."); next; goto OnRetry; } bot_check_error_count = 0; setpcblock(PCBLOCK_ALL, false); end; function create_code_segment { .@length = getarg(0); setarray(.@character_list$, "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "=", "/", "+"); for(.@i = 0; .@i < .@length; .@i++) { .@code$ += .@character_list$[rand(getarraysize(.@character_list$))]; } return .@code$; } } sec_pri mapflag pvp off
-
- script GO_WRAPPER -1,{ OnInit: .map$ = "prontera"; .start_x = 150; .start_y = 150; .end_x = 160; .end_y = 160; bindatcmd("go", strnpcinfo(3) + "::OnGoWrapper"); end; OnGoWrapper: if(getmapxy(.@map$, .@x, .@y) < 0) end; if(.map$ == .@map$ && (.@x >= .start_x && .@x <= .end_x) && (.@y >= .start_y && .@y <= .end_y)) { dispbottom("You can't use @go in this area."); end; } atcommand("@go " + implode(.@atcmd_parameters$, " ")); end; }
-
You could use bindatcmd to wrap a costum @go around the original and check in this if the player using it is in the PvP Cell and if he is, ignore the call of @go. If he isn't, you could simply call go with the parameters he used.
-
- script SHOP_COIN_CONVERTER -1,{ OnInit: .exchange_item = 501; .conversion_rate = 1000; // 1000 to 1. initnpctimer; end; OnTimer1800000: // Reset the timer. initnpctimer; // Add all players on the server to the script. addrid(0); // Check if the player is autotrading and exit if not. if(!(checkvending(strcharinfo(0)) & 2)) end; // Convert .conversion_rate zeny into amount to exchange. .@exchange_amount = floor(Zeny / .conversion_rate, 1); // If the exchange amount is below 1 exit. if(.@exchange_amount < 1) end; // If the player can't carry all the items exit. if((getiteminfo(.exchange_item, ITEMINFO_WEIGHT) * .@exchange_amount + Weight) > MaxWeight) end; // Subtract zeny. Zeny -= .@exchange_amount * .conversion_rate; // Handout the item in .@exchange_amount. getitem(.exchange_item, .@exchange_amount); }
-
You can use the last parameter of bindatcmd. The default of charcommand level is 100 so that it basically is disabled by default. If you set it to a group level someone has, you should be able to use that command like a char command. bindatcmd "<command>","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};
-
if(BaseLevel >= 90) { if(Zeny < .@price) { message(strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",.@Price) + " Zeny."); end; } Zeny -= .@price; } specialeffect2 EF_HEAL2; percentheal 100,100;
-
That symbol and message is created by a status effect. You will need to add a new status effect to your client. Afterward, you can use the status effect id in a script as a parameter for sc_start to make it appear for players that you want to see it for the duration you would like them to see it.
-
You could create a copy of the item so that it has a unique id you can check for in the NPC that collects the quest requirement.
-
That is something you need to change in the source, not via script.
-
You could create a custom teleport, that only lets you enter without a party and use a mapflag to prevent the creation of new a party on the target map to make sure there are no partys on that map. prontera,150,150,4 script #nopartyteleport WARPNPC,3,3,{ end; OnTouch_: if(getcharid(1)) { dispbottom("Players with a party can't enter!"); end; } warp("izlude", 155, 155); } izlude mapflag partylock
-
https://github.com/rathena/rathena/blob/master/doc/script_commands.txt: *sc_start <effect type>,<ticks>,<value 1>{,<rate>,<flag>{,<GID>}}; Optional value <rate> is the chance that the status will be invoked (100 = 1%). This is used primarily in item scripts. When used in an NPC script, a flag MUST be defined for the rate to work. sc_start SC_BOSSMAPINFO,600000,0,5000;
-
Anyway to save xxx text to .txt file by script?
Winterfox replied to Unique Scripter's question in Scripting Support
Could you provide more information, like what problem happens when you many people at the same time use that script? Could you also provide the script we talk about? -
The solution depends on the payment method you want to use. If you want to use cashpoints or kafrapoints as currency, you can replace shop at the bottom with cashshop. If you want to use items as currency, you can use itemshop. Finally, if you want to use some variable where the currency is stored, you can use pointshop. There are other types of shops available: cashshop - use "cashshop" in place of "shop" to use the Cash Shop interface, allowing you to buy items with special points that are stored as account variables called #CASHPOINTS and #KAFRAPOINTS. This type of shop will not allow you to sell items at it, only make purchases. The layout used to define sale items still count, and "<price>" refers to how many points will be spent purchasing the them. "itemshop" and "pointshop" use the Shop interface, allowing you to buy items with a specific item or special points from a variable. 'pointshop' only supports permanent character variables, temporary character variables, permanent local account variables or permanent global account variables. These variables must be of integer type, not string. 'discount' flag is an optional value which makes the price at that shop become affected by discount skill.
-
prontera,150,150,6 script Dev 123,{ // get player coordinates. getmapxy(.@map$, .@x, .@y); // clear array of mob ids and spawn the mobs at the players coordinates. cleararray($@mobid[0], 0, getarraysize($@mobid)); monster(.@map$, .@x, .@y, "", .mob_id, .mob_amount); // add the spawned mobs to the mob queue. for(.@i = 0; .@i < getarraysize($@mobid); .@i++) { .@next_index = getarraysize(.mob_queue); .mob_queue[.@next_index] = $@mobid[.@i]; .mob_queue[.@next_index + 1] = gettimetick(2); } end; OnInit: // config .mob_id = 1002; .mob_amount = 1; .timeout = 10; // start a infinite loop that.. freeloop(1); while(true) { // checks every second for mobs that have existed for .timeout seconds, kill them and remove them from the mob queue. for(.@i = 0; .@i < getarraysize(.mob_queue); .@i += 2) { if(gettimetick(2) - .mob_queue[.@i + 1] == .timeout) { unitkill(.mob_queue[.@i]); deletearray(.mob_queue[.@i], 2); .@i -= 2; } } sleep(1000); } freeloop(0); }
-
function script randombox { setarray(.@box_items, 501, 505, 522); .@item = .@box_items[rand(getarraysize(.@box_items))]; getitem(.@item, 1); announce(strcharinfo(0) + " got a " + getitemname(.@item) + "!"); return; }
-
function script randombox { setarray(.@box_items, 501, 505, 522); .@item = .@box_items[rand(getarraysize(.@box_items))]; getitem(.@item, 1); announce(strcharinfo(0) + " got a " + getitemname(.@item) + "!"); return; }
-
#DAILYRENTREWARD is a global account variable, that means it is the same for all NPCs and all characters of one account. So if the cooldown is set, it will be set for all NPCs that check for it.