-
Posts
10018 -
Joined
-
Days Won
408
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Emistry
-
Information about the quest_warpra script
Emistry replied to Valcars's question in Scripting Support
using the left/right shift operators to binary mathematical operations as they have two important qualities: Left-shifting a bitmask once multiplies by two. Right-shifting once divides by two. assuming the following scenario 1 = map_1 2 = map_2 4 = map_3 8 = map_4 16 = map_5 32 = map_6 64 = map_7 when you sum up the value for 1 + 2 + 4 + 8 = 15 (you have access to map1 , map2, map3, map4) when you sum up the value for 4 + 16 + 64 = 84 (you have access to map3, map5, map7) when you sum up all the values , then you have access to all map above. you could only store up to total value of 2147483647 -
Dispel Buffs on entering portal or warp by priest but not on teleport
Emistry replied to Eross's question in Scripting Support
you can try something like this. OnPCLoadMapEvent: if (inarray(.Maps$, strcharinfo(3)) != -1 && @current_map$ != strcharinfo(3)) { //sc_end sc_spirit; sc_end sc_gospel; sc_end SC_POEMBRAGI; sc_end SC_APPLEIDUN; sc_end SC_ASSNCROS; sc_end SC_WHISTLE; //sc_end 37; // holy weapon //sc_end 38; // holy armor sc_end 187; // increase all stat sc_end 194; // increase hit sc_end 196; // increase flee sc_end 198; // max hp increase sc_end 199; // max sp increase sc_end 200; // attach strength sc_end 202; // increase def sc_end 214; // SC_SCRESIST sc_end 175; // POEMBRAGI sc_end 181; // SERVICE4U //specialeffect2 235; @current_map$ = strcharinfo(3); addtimer 3000, strnpcinfo(3)+"::OnCheck"; } end; OnCheck: if (@current_map$ != "") { if (@current_map$ == strcharinfo(3)) addtimer 3000, strnpcinfo(3)+"::OnCheck"; else @current_map$ = ""; } end; -
- script Sample -1,{ OnPCLoginEvent: OnPCBaseLvUpEvent: if (@fakename_enabled) atcommand("@fakename"); atcommand("@fakename "+ strcharinfo(0)+" (Lv. "+BaseLevel+")"); @fakename_enabled = 1; end; }
-
addrid(2,0,getcharid(1)); dispbottom "[Monster of the Day]: Experience Gained Base:"+strmobinfo(6,.mobid)+" Job:"+strmobinfo(7,.mobid)+""; set BaseExp,(BaseExp+strmobinfo(6,.mobid)); set JobExp,(JobExp+strmobinfo(7,.mobid)); end; change into getpartymember getcharid(1), 2; .@mob_bexp = (getmonsterinfo(killedrid, MOB_BASEEXP) / $@partymembercount); .@mob_jexp = (getmonsterinfo(killedrid, MOB_JOBEXP) / $@partymembercount); .@current_level = BaseLevel; for (.@i = 0; .@i < $@partymembercount; .@i++) { if (attachrid($@partymemberaid[.@i])) { .@gap = (BaseLevel - .@current_level); if (.@gap >= -15 && .@gap <= 15) { dispbottom "[Monster of the Day]: Experience Gained Base:"+F_InsertComma(.@mob_bexp)+" Job:"+F_InsertComma(.@mob_jexp)+""; BaseExp += .@mob_bexp; JobExp += .@mob_jexp; } detachrid; } } end;
-
// Add the maps for your world boss event here. If you only want one, just add one. setarray .WBMAPS$, "prontera"; read the configuration part
-
.@string$ = "SELECT char_id FROM char_reg_str WHERE char_id = '" + escape_sql(.c_id$) + "' AND key = '" + escape_sql(.w_key$) + "'"; https://www.techonthenet.com/mysql/and.php
-
Guild Pack NPC which can activate during WOE days
Emistry replied to DEsMOn's question in Script Requests
OnInit: OnClock1700: OnClock1830: hideonnpc strnpcinfo(3); if (gettime(DT_DAYOFWEEK) == TUESDAY || gettime(DT_DAYOFWEEK) == THURSDAY || gettime(DT_DAYOFWEEK) == SUNDAY ) { if (gettime(DT_HOUR) == 17 || (gettime(DT_HOUR) == 18 && gettime(DT_MINUTE) <= 30)) hideoffnpc strnpcinfo(3); } end; -
How to add GM Function / Start event manually
Emistry replied to GM-Beyond's question in Scripting Support
prontera,114,154,5 script Poring Race 568,{ if (getgmlevel() >= 99) { mes "Would you like to "++" the event?"; if (select("continue", (.access_Prace) ? "Stop Event" : "Start Event") == 2) { if (.access_Prace) { donpcevent strnpcinfo(3)+"::OnPraceEnd"; mes "event stopped."; } else { donpcevent strnpcinfo(3)+"::OnPraceStart"; mes "event started."; } close; } } if( .access_Prace == 0 ) { mes "[Event Employee: Poring Race]"; mes "Poring Race has ended."; close; } mes "[Event Employee: Poring Race]"; mes "Do you want to participate on Poring Race?"; if( select( "Yes","No" ) -1 ) { next; mes "[Event Employee: Poring Race]"; mes "See you again next time!"; close; } if( .access_Prace == 0 ) { next; mes "[Event Employee: Poring Race]"; mes "..."; mes "..."; mes "Cheater!!~~"; close; } close2; @prace_winner$ = ""; warp "p_track01",52,41; end; // OnInit: OnClock1434: if( gettime(3)%2 ) end; OnPraceStart: set .access_Prace, 1; announce "Event Employee [Poring Race]: Poring Race is about to begin. To participate kindly approach me at Event Room or use @event",0; setnpctimer 100000,"Bidder#prace0"; startnpctimer "Bidder#prace0"; end; OnPraceEnd: set .access_Prace, 0; announce "Event Employee [Poring Race]: Poring Race is over! Thank you for participating.",0; end; } try -
Guild Pack NPC which can activate during WOE days
Emistry replied to DEsMOn's question in Script Requests
OnTue1800: OnThu1800: OnSun1800: hideoffnpc strnpcinfo(3); end; OnTue2000: OnThu2000: OnSun2000: hideonnpc strnpcinfo(3); end; OnClock<hour><minute>: OnMinute<minute>: OnHour<hour>: On<weekday><hour><minute>: OnDay<month><day>: -
use gettimetick if (#luckyspin < gettimetick(2)){ #luckyspin = gettimetick(2) + (3600 * 12);
-
probably something went wrong with the script, always check map-server for errors.
-
https://rathena.org/board/topic/129536-problem-about-guild-emblem-useing-web-serviec-not-show/
-
Guild Pack NPC which can activate during WOE days
Emistry replied to DEsMOn's question in Script Requests
prontera,155,181,5 script Sample 757,{ if (getcharid(2) && #GUILD_PACK_CD != gettime(DT_YYYYMMDD)) { #GUILD_PACK_CD = gettime(DT_YYYYMMDD); getitem 30005, 1; } end; OnInit: OnHour00: if (gettime(DT_DAYOFWEEK) != TUESDAY && gettime(DT_DAYOFWEEK) != THURSDAY && gettime(DT_DAYOFWEEK) != SUNDAY ) { hideonnpc strnpcinfo(3); } end; } - Id: 30005 AegisName: G-Pack Script: | rentitem 1201, 86400; rentitem 1202, 86400; rentitem 1203, 86400; -
- Id: 501 AegisName: Red_Potion Name: Red Potion Type: Healing Buy: 10 Weight: 70 Script: | #CASHPOINTS += 1000; dispbottom "You have "+callfunc("F_InsertComma", #CASHPOINTS)+" cash in your account” thanks!";
-
may refer this topic https://rathena.org/board/topic/101222-adding-sky-in-the-map/
-
bg_create_team(....) you dont have this script command added to your server, or forgotten recompile if you have already added it.
-
query the data from the char_reg_str table
-
conf/log_athena.conf#L92-L94 // Log MVP Monster Drops (Note 1) // Outdated. Use Pick_Log instead. But this log could be useful to keep track slayed MVPs log_mvpdrop: no
-
5@tower,82,112,2 script #102FShadowDust1 844,{ end; OnInstanceInit: donpcevent instance_npcname("#102FShadowDust")+"::OnEnable"; monster instance_mapname("5@tower"),83,85,"Entweihen Crothen",1957,1,instance_npcname("#102FShadowDust1")+"::OnMyMobDead"; end; OnMyMobDead: set .@map$, instance_mapname("5@tower"); set .@mob_dead_num,mobcount(.@map$,instance_npcname("#102FShadowDust1")+"::OnMyMobDead"); if (.@mob_dead_num < 1) { mapannounce .@map$, "Mysterious Voice: Who are you to dare intrude upon my sanctuary?!",bc_map,"0xffff00"; donpcevent instance_npcname("#102FShadowDust")+"::OnDisable"; donpcevent instance_npcname("Lucid Crystal#102")+"::OnEnable"; enablenpc "Devil Square Guardian#2"; //SetItemPartyInMap in_102floor 100 hideoffnpc instance_npcname("et_reward_npc"); // <------- ADD THIS } end; } 5@tower,83,85,4 script et_reward_npc 406,{ // rewards... end; OnInstanceInit: hideonnpc strnpcinfo(3); end; }
-
if( query_sql( "SELECT `team_name` FROM `tournament` WHERE `team_name` = '"+escape_sql( .@team_name$ )+"'", .@team_name$ ) ){ you need to assign a variable to store the data you query from database.
-
input @itemid; if (getiteminfo(@itemid, ITEMINFO_ID) <= 0) { mes @itemid+" has failed!"; next; goto INTRO; }
-
counting total member from the database? gm_room,76,56,5 script Tournament 757,{ mes "Team Name"; input .@team_name$; next; mes "Team Name: "+.@team_name$; query_sql( "SELECT COUNT(1) FROM `tournament` WHERE `team_name` = '"+escape_sql(.@team_name$)+"' GROUP BY `team_name`",.@amount ); mes "Total Member: " + .@amount; close; }
-
[Solved] H> Modified Hourly Points
Emistry replied to Sallycantdance's question in Scripting Support
- script hourly_point_main -1,{ OnInit: .npc_name$ = strnpcinfo(3); bindatcmd "check",.npc_name$+"::OnAtcommand"; end; OnAtcommand: dispbottom "Accumulated "+#daily_minute_count; end; OnUpdate: if (checkvending()) { dispbottom "Hourly point stopped due to vending."; end; } #daily_minute_count++; deltimer .npc_name$+"::OnUpdate"; switch ( #daily_minute_count ) { default: break; 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; } OnPCLoginEvent: addtimer ( 60 * 1000 ), .npc_name$+"::OnUpdate"; end; } -
EquipScript: | addtimer (60 * 1000), "Sample::OnUpdate"; UnEquipScript: | deltimer "Sample::OnUpdate"; - script Sample -1,{ OnUpdate: if (checkvending()) { dispbottom "Hourly Point stopped due to vending."; } else if (checkchatting()) { dispbottom "Hourly Point stopped due to chatroom."; } else if (checkidle() >= 60) { // idled for 60 seconds dispbottom "Hourly Point stopped due to idle."; } else { #hourly_point_duration++; if (#hourly_point_duration >= 60) { #hourly_point++; dispbottom "Hourly Point +1. Total "+#hourly_point+" Points."; } addtimer (60 * 1000), strnpcinfo(3)+"::OnSample"; } end; }