Jump to content

Winterfox

Members
  • Posts

    232
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Winterfox

  1. Well, what I posted was an example for you to modify yourself to fit your needs. If you want to be able to only mark one specific mob on a map by mob id you can do it like this: - script MOB_MARKER -1,{ OnInit: bindatcmd("markmobs", strnpcinfo(3) + "::OnMarkMobs"); bindatcmd("unmarkmobs", strnpcinfo(3) + "::OnUnmarkMobs"); end; function delete_viewpoints { freeloop(1); for(.@i = 0; .@i < getarraysize(@viewpoints_x); .@i++) { viewpoint(2, @viewpoints_x[.@i], @viewpoints_y[.@i], (.@i + 1), 0xFF0000); } freeloop(0); deletearray(@viewpoints_x, getarraysize(@viewpoints_x)); deletearray(@viewpoints_y, getarraysize(@viewpoints_y)); } OnMarkMobs: if(.@atcmd_numparameters != 1) { dispbottom("Usage: @markmobs MobID"); end; } .@mob_id = atoi(.@atcmd_parameters$[0]); if((.@mob_name$ = strmobinfo(1, .@mob_id)) == "") { dispbottom("A mob with the Mob ID " + .@mob_id + " does not exist."); end; } getmapxy(.@map$, .@x, .@y); getmapunits(BL_MOB, .@map$, .@mobs); if(getarraysize(.@mobs) == 0) { dispbottom("There are no mobs on this map."); end; } if(getarraysize(@viewpoints_x) > 0) { delete_viewpoints(); } freeloop(1); for(.@i = 0; .@i < getarraysize(.@mobs); .@i++) { if(getunitname(.@mobs[.@i]) != .@mob_name$) { continue; } getunitdata(.@mobs[.@i], .@unit_data); .@viewpoint_index = getarraysize(@viewpoints_x); viewpoint(1, .@unit_data[UMOB_X], .@unit_data[UMOB_Y], (.@viewpoint_index + 1), 0xFF0000); @viewpoints_x[.@viewpoint_index] = .@unit_data[UMOB_X]; @viewpoints_y[.@viewpoint_index] = .@unit_data[UMOB_Y]; } freeloop(0); if(getarraysize(@viewpoints_x) == 0) { dispbottom("Mob ID " + .@mob_id + " was not found on the map."); end; } end; OnUnmarkMobs: if(getarraysize(@viewpoints_x) == 0) end; delete_viewpoints(); }
  2. I didn't test it so there might be slight typos or small bugs, but basically you can do it like this: - script MOB_MARKER -1,{ OnInit: .map$ = "yourmap"; bindatcmd("markmobs", strnpcinfo(3) + "::OnMarkMobs"); bindatcmd("unmarkmobs", strnpcinfo(3) + "::OnUnmarkMobs"); end; function unmark_mobs { freeloop(1); for(.@i = 0; .@i < getarraysize(.@viewpoints_x); .@i++) { viewpoint(2, @viewpoints_x[.@i], @viewpoints_y[.@i], (.@i + 1), 0xFF0000); } freeloop(0); deletearray(@viewpoints_x, getarraysize(@viewpoints_x)); deletearray(@viewpoints_y, getarraysize(@viewpoints_y)); return; } OnMarkMobs: if(getarraysize(@viewpoints_x) > 0) { unmark_mobs(); } getmapunits(BL_MOB, .map$, .@mobs); freeloop(1); for(.@i=0; .@i < getarraysize(.@mobs); .@i++) { getunitdata(.@mobs[.@i], .@unit_data); viewpoint(1, .@unit_data[UMOB_X], .@unit_data[UMOB_Y], (.@i + 1), 0xFF0000); @viewpoints_x[.@i] = .@unit_data[UMOB_X]; @viewpoints_y[.@i] = .@unit_data[UMOB_Y]; } freeloop(0); end; OnUnmarkMobs: if(getarraysize(@viewpoints_x) > 0) { unmark_mobs(); } }
  3. I see. I went with the first solution I came up with from the top of my head. But it isn't that hard to do it the way you are showing either. You simply can use an invisible npc with an OnTouchNPC label that teleports the mob back into the desired area. - script EXAMPLE_SPAWN -1,{ OnInit: areamonster("prontera", 151, 149, 155, 143, "", "poring", 2); } - script MOB_BOUNDARY_CELL -1,{ OnTouchNPC: unitwarp(getattachedrid(), "this", 153, 147); } prontera,150,150,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#01 -1,0,0 prontera,151,150,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#02 -1,0,0 prontera,152,150,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#03 -1,0,0 prontera,153,150,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#04 -1,0,0 prontera,154,150,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#05 -1,0,0 prontera,155,150,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#06 -1,0,0 prontera,156,150,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#07 -1,0,0 prontera,150,149,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#08 -1,0,0 prontera,150,148,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#09 -1,0,0 prontera,150,147,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#10 -1,0,0 prontera,150,146,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#11 -1,0,0 prontera,150,145,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#12 -1,0,0 prontera,150,144,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#13 -1,0,0 prontera,150,144,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#14 -1,0,0 prontera,151,144,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#15 -1,0,0 prontera,152,144,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#16 -1,0,0 prontera,153,144,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#17 -1,0,0 prontera,154,144,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#18 -1,0,0 prontera,155,144,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#19 -1,0,0 prontera,156,144,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#20 -1,0,0 prontera,156,149,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#21 -1,0,0 prontera,156,148,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#22 -1,0,0 prontera,156,147,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#23 -1,0,0 prontera,156,146,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#24 -1,0,0 prontera,156,145,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#25 -1,0,0 prontera,156,144,0 duplicate(MOB_BOUNDARY_CELL) MOB_BOUNDARY_CELL#26 -1,0,0
  4. This is not a topic for the scripting section.
  5. Try this: - script MOB_BOUNDARY -1,{ OnInit: // CONFIG .map$ = "prontera"; .check_interval = 1000; .center_x = 150; .center_y = 150; .range_x = 5; .range_y = 5; // CONFIG END .start_x = .center_x - .range_x; .start_y = .center_y - .range_y; .end_x = .center_x + .range_x; .end_y = .center_y + .range_y; areamonster(.map$, .start_x, .start_y, .end_x, .end_y, "", "poring", 1); freeloop(1); while(true) { deletearray(.@mobs, getarraysize(.@mobs)); getmapunits(BL_MOB, .map$, .@mobs); for(.@i = 0; .@i < getarraysize(.@mobs); .@i++) { getunitdata(.@mobs[.@i], .@mob_data); if( (.@mob_data[UMOB_X] < .start_x || .@mob_data[UMOB_X] > .end_x) || (.@mob_data[UMOB_Y] < .start_y || .@mob_data[UMOB_Y] > .end_y) ) { unitstopwalk(.@mobs[.@i], USW_FORCE_STOP); getfreecell(.map$, .@x, .@y, .center_x, .center_y, .range_x, .range_y); unitwalk(.@mobs[.@i], .@x, .@y); } } sleep(.check_interval); } freeloop(0); } Simply set the map, center coordinates and range for the area you want the mobs to be able to move in. Once they step outside the area, they will stop and walk back into it.
  6. Those stats aren't enchantments, those are random options. Those are groups of bonuses of which a specified amount gets picked randomly and added to an item on drop. For further explanation you can check item_randomopt_db.yml, item_randomopt_group.yml and mob_db.yml in the last you should check the RandomOptionGroup setting.
  7. 1. I don't know how the status changes accumulate if you stack them. But I think it isn't hard for you to test that, simply choose a rate and use an item like bubble gum and check how it influences your rate. 2. If your server is configured to have the default rates, those would be 1x, when a player chooses low it would add a bonus of 100% so 2x, on mid 19900% or 20x etc. It is good that you asked, since I realized I made a mistake in the script above and could correct it.
  8. I didn't test it, but changing the overweight check macros in pc.hpp from: #define pc_is50overweight(sd) ( (sd)->weight * 100 >= (sd)->max_weight * battle_config.natural_heal_weight_rate ) #define pc_is70overweight(sd) ( (sd)->weight * 100 >= (sd)->max_weight * battle_config.natural_heal_weight_rate_renewal ) #define pc_is90overweight(sd) ( (sd)->weight * 10 >= (sd)->max_weight * 9 ) to: #define pc_is50overweight(sd) ( false ) #define pc_is70overweight(sd) ( false ) #define pc_is90overweight(sd) ( false ) should do what you want.
  9. It won't influence the individual rates. What he provides is more or less just a poll. I think there is no direct way to overwrite rates directly for an individual player. But what you could do is set the rates of your server to default and use status changes to give each player an exp and drop bonus according to his choice to basically get the effect of different rates. - script RateSelect -1,{ OnSetRate: OnPCLoginEvent: switch(individual_rate) { case 1: .@exp_rate_bonus = .low_rate_exp_bonus; .@drop_rate_bonus = .low_rate_drop_bonus; break; case 2: .@exp_rate_bonus = .mid_rate_exp_bonus; .@drop_rate_bonus = .mid_rate_drop_bonus; break; case 3: .@exp_rate_bonus = .high_rate_exp_bonus; .@drop_rate_bonus = .high_rate_drop_bonus; break; default: mes "Select your preferred server rate for this character."; mes "BE CAREFUL: YOU CAN'T CHANGE IT AFTERWARD!" individual_rate = select("Low Rate:Mid Rate:High Rate"); close2; goto OnSetRate; } sc_start SC_EXPBOOST, INFINITE_TICK, .@exp_rate_bonus, 10000, SCSTART_NOICON; sc_start SC_ITEMBOOST, INFINITE_TICK, .@drop_rate_bonus, 10000, SCSTART_NOICON; end; OnInit: .low_rate_exp_bonus = 100; .mid_rate_exp_bonus = 19900; .high_rate_exp_bonus = 199900; .low_rate_drop_bonus = 100; .mid_rate_drop_bonus = 19900; .high_rate_drop_bonus = 199900; }
  10. 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.
  11. The command looks correct. Can you provide the rest of the script to have the full context?
  12. prontera,150,150,5 script HourTimer 111,{ end; OnInit: On7200000: initnpctimer; delwaitingroom; waitingroom("" + gettimestr("%H:%M:%S %p",15),0); }
  13. Can you show your fishing script?
  14. - 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; } }
  15. 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
  16. //================================================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; }
  17. //================================================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; }
  18. //===== 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
  19. - 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; }
  20. 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.
  21. - 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); }
  22. 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>};
  23. 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;
  24. 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.
×
×
  • Create New...