-
Posts
1282 -
Joined
-
Last visited
-
Days Won
41
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Posts posted by Skorm
-
-
13 hours ago, Questune said:
Thank you!, is this the same of what I wanted?
Pretty close. You can modify it with the NPC settings to get what you want.
I added @grtime since I felt you might not be able to add that on your own.
-
1
-
-
@Questune Here's a modified version of my goldroom script. You can download free here: https://skorm.gumroad.com/l/wJIhW?layout=profile
//NPCS //Goldroom V1.1 prontera,160,158,2 script Private Gold Room 100,{ mes .npc$; mes "Hello, "+strcharinfo(0)+", I'm the "; mes "Private gold room manager."; mes "Here you can rent your own private gold room."; next; for(.@a = 0;getarraysize(getd(".room"+.@a+"$"));.@a++) { .rmn$ = ".room"+.@a+"$"; .rrm$ = getd(.rmn$+"[0]"); .map$ = getd(.rmn$+"[1]"); .mes$[.@a] = .rrm$; setd ".remain"+.@a+"$", callfunc("t",atoi(getd(".rtime_"+.map$+"$"))-gettimetick(2)); while(.@b<=getarraysize(.srch$)) { .@b++; if(.srch$[.@b-1] != "") { while(.@i<=countstr(.rrm$, .srch$[.@b-1])) { .@i++; if(atoi(getd(".remain"+.@a+"$"))>0) set .mes$[.@a], replacestr(.mes$[.@a], .srch$[.@b-1], getd(getd(".srch$["+(.@b-1)+"]")+.@a+"$"), 1, 1); else set .mes$[.@a], replacestr(.mes$[.@a], .repl$, .empty$, 1, 1); } } set .@i, 0; } set .@b,0; } set .@menu$, implode(.mes$,":"); set .@menu, select(.@menu$)-1; set .@remain, atoi(getd(".remain"+.@menu+"$")); if(strcharinfo(atoi(getd(".type"+.@menu+"$")))==getd(".name" +.@menu+"$") || getgmlevel() >= 60) { if(.@remain>0) { warp getd(".room"+.@menu+"$[1]"),0,0; end; } } if(.@remain>0) { mes .npc$; mes "This room is already in use please pick a different one."; close; } mes .npc$; mes "You may rent this room for ^0000FFYourself^000000, ^0000FFParty members^000000, or ^0000FFGuild members^000000."; next; set .@menu2, select("Myself Only:Party Members:Guild Members")-1; mes .npc$; mes "How long would you like to rent this room?"; next; set @menu, select(.menu2$)-1; if(Zeny<(.price[@menu]*.multi)) { mes .npc$; mes "I'm sorry you don't have enough"; mes "Zeny for that."; emotion ET_CRY; close; } set Zeny, Zeny-(.price[@menu]*.multi); setd(".type" +.@menu+"$", .@menu2); setd(".time" +.@menu+"$", callfunc("t",.times[@menu])); setd(".name" +.@menu+"$", strcharinfo(.@menu2)); setd(".rtime_"+getd(".room"+.@menu+"$[1]")+"$", gettimetick(2)+.times[@menu]); initnpctimer(.cnt$+"#"+.@menu); warp getd(".room"+.@menu+"$[1]"),0,0; end; Oninit: // Room# Room Name , Map ; setarray .room0$ , "PGR 1 = .name, .time, .remain" , "06guild_01"; setarray .room1$ , "PGR 2 = .name, .time, .remain" , "06guild_02"; setarray .room2$ , "PGR 3 = .name, .time, .remain" , "06guild_03"; setarray .room3$ , "PGR 4 = .name, .time, .remain" , "06guild_04"; setarray .room4$ , "PGR 5 = .name, .time, .remain" , "06guild_05"; setarray .room5$ , "PGR 6 = .name, .time, .remain" , "06guild_06"; setarray .room6$ , "PGR 7 = .name, .time, .remain" , "06guild_07"; setarray .room7$ , "PGR 8 = .name, .time, .remain" , "06guild_08"; setarray .srch$, ".name", ".time", ".remain"; //String searched and replaced in the Room Name Field. setarray .mapfs, mf_nomemo, mf_nosave, mf_noteleport, mf_nowarp, mf_nowarpto, mf_noskill; //mapflags setarray .times, 60, 60*15, 60*30, 60*45, 60*60; //In seconds. setarray .price, 10, 150 , 300 , 450 , 600 ; //Price of time multiplied by .multi. set .npc$, "[^0000FFManager^000000]"; //NPC name set .cnt$, "NPC"; //connected npc name set .repl$, ".name, .time, .remain"; //part of the name you want replace by .empty$ if it's not being used. set .empty$, "EMPTY"; // This text will appear when the room is not being used. set .multi, 100000; while(.@a++<=getarraysize(.price)) //Building static menus set .menu2$, .menu2$+(.times[.@a-1]/60)+" minute"+((.times[.@a-1]/60>1)?"s":"")+" costs "+.price[.@a-1]+"M.:"; while(getarraysize(getd(".room"+.@i+"$"))) { setmapflag getd(".room"+.@i+"$[1]"),.mapfs[.@i]; set .maps$, .maps$+"|"+getd(".room"+.@i+"$[1]"); .@i++; } set .maps$, .maps$+"|"; } 06guild_01,50,50,5 script NPC#0 100,500,500,{ if(mobcount(strcharinfo(3),strnpcinfo(0)+"::OnDeathEvent")) { mes .npc$; mes getd(".amnt_"+strcharinfo(3))+" mobs still remain!"; mes "You need to kill them all before I can summon more."; emotion ET_SWEAT; close; } set .@len, getarraysize(getd(".monster"+strnpcinfo(2))); for(.@h = 0; .@h < .@len; .@h += 3) { .@i++; set .@mobs[.@i-1], getd(".monster"+strnpcinfo(2)+"["+.@h+"]"); set .@chnc[.@i-1], getd(".monster"+strnpcinfo(2)+"["+(.@h+1)+"]"); set .@amnt[.@i-1], getd(".monster"+strnpcinfo(2)+"["+(.@h+2)+"]"); set .@menu$, .@menu$+getmonsterinfo(.@mobs[.@i-1],0)+":"; } set .@menu$, .@menu$+"Back to SavePoint"; mes .npc$; mes "Select which mob you'd like me to summon!"; next; set @menu, select(.@menu$)-1; if(@menu>=getarraysize(.@mobs)) { close2; warp "SavePoint",0,0; end; } setd ".drop_"+strcharinfo(3), .@chnc[@menu]; setd ".amnt_"+strcharinfo(3), .@amnt[@menu]; monster strcharinfo(3),0,0,"--ja--",.@mobs[@menu],.@amnt[@menu],strnpcinfo(0)+"::OnDeathEvent"; close; OnTouch: if(strcharinfo(atoi(getvariableofnpc(getd(".type"+strnpcinfo(2)+"$"),.cnt$)))!=getvariableofnpc(getd(".name"+strnpcinfo(2)+"$"),.cnt$) && getgmlevel() <= 60) { warp "SavePoint",0,0; end; } end; OnTimer1000: initnpctimer; setd ".timer"+strnpcinfo(2), (atoi(getvariableofnpc(getd(".rtime_"+strnpcinfo(4)+"$"),.cnt$))-gettimetick(2)); if(gettimetick(2)>=getd(".tick"+strnpcinfo(2))) { setd ".tick"+strnpcinfo(2), gettimetick(2)+60; mapannounce strnpcinfo(4),callfunc("t",getd(".timer"+strnpcinfo(2)))+" remaining!",bc_map|bc_blue; } if( getd(".timer"+strnpcinfo(2)) <= 0 ) { stopnpctimer; mapannounce strnpcinfo(4),"Gold Room Time has ended!",bc_map|bc_blue; mapwarp strnpcinfo(4),"prontera",156,191; killmonster strnpcinfo(4),strnpcinfo(0)+"::OnDeathEvent"; } end; OnDeathEvent: if(!playerattached()) end; getitem 969,rand(getd(".drop_"+strcharinfo(3))); setd ".amnt_"+strcharinfo(3), getd(".amnt_"+strcharinfo(3))-1; if( getd(".amnt_"+strcharinfo(3))<=0 ) mapannounce strcharinfo(3),"All monsters have been killed!",bc_map|bc_blue; end; OnCommandEvent: if ( !compare(getvariableofnpc(.maps$,.cnt$),"|"+strcharinfo(3)+"|") || getgmlevel() >= 99 ) atcommand .@atcmd_command$+" "+ implode( .@atcmd_parameters$," " ); else if (.@atcmd_command$ == "grtime") dispbottom callfunc("t",getd(".timer"+strnpcinfo(2)))+" remaining!"; else message strcharinfo(0), "You're not allowed to use that command here!"; end; OnInit: // Room# <ID> Chance Amount ... setarray .monster0, 1002, 2 , 100 , 1236, 3, 100, 1095, 4, 100, 1105, 5, 100, 1176, 6, 100; setarray .monster1, 1002, 2 , 100 , 1236, 3, 100, 1095, 4, 100, 1105, 5, 100, 1176, 6, 100; setarray .monster2, 1002, 2 , 100 , 1236, 3, 100, 1095, 4, 100, 1105, 5, 100, 1176, 6, 100; setarray .monster3, 1002, 2 , 100 , 1236, 3, 100, 1095, 4, 100, 1105, 5, 100, 1176, 6, 100; setarray .monster4, 1002, 2 , 100 , 1236, 3, 100, 1095, 4, 100, 1105, 5, 100, 1176, 6, 100; setarray .monster5, 1002, 2 , 100 , 1236, 3, 100, 1095, 4, 100, 1105, 5, 100, 1176, 6, 100; setarray .monster6, 1002, 2 , 100 , 1236, 3, 100, 1095, 4, 100, 1105, 5, 100, 1176, 6, 100; setarray .monster7, 1002, 2 , 100 , 1236, 3, 100, 1095, 4, 100, 1105, 5, 100, 1176, 6, 100; set .cnt$, "Private Gold Room"; //Connecting NPC name (Change this if you change the npc above) set .npc$, "[^0000FF"+strnpcinfo(1)+"^000000]"; //NPC Name set .dlay, 60; //Announce timer delay in seconds bindatcmd "storage",strnpcinfo(3)+"::OnCommandEvent"; //Disabled commands. bindatcmd "warp",strnpcinfo(3)+"::OnCommandEvent"; bindatcmd "savepoint",strnpcinfo(3)+"::OnCommandEvent"; bindatcmd "useskill",strnpcinfo(3)+"::OnCommandEvent"; bindatcmd "skillon",strnpcinfo(3)+"::OnCommandEvent"; bindatcmd "grtime",strnpcinfo(3)+"::OnCommandEvent"; } //DUPLICATIONS 06guild_02,50,50,5 duplicate(NPC#0) NPC#1 100,500,500 06guild_03,50,50,5 duplicate(NPC#0) NPC#2 100,500,500 06guild_04,50,50,5 duplicate(NPC#0) NPC#3 100,500,500 06guild_05,50,50,5 duplicate(NPC#0) NPC#4 100,500,500 06guild_06,50,50,5 duplicate(NPC#0) NPC#5 100,500,500 06guild_07,50,50,5 duplicate(NPC#0) NPC#6 100,500,500 06guild_08,50,50,5 duplicate(NPC#0) NPC#7 100,500,500 //FUNCTIONS function script t { function s; set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; return ( ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ) ); function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); } }
-
1
-
-
7 hours ago, yodaGG said:
///This function takes an array of strings and builds a menu players can navigate. ///Usage: f_displayPages(.@string_array${, .@page_size {, .@extra_string_array$}}); ///Output: This function returns the selected item index from the given array. function script f_displayPages { .@page_size = getarg(1, 10); .@len = getarraysize(getarg(0)); .@pages = .@len / .@page_size; .@pages -= .@len > .@page_size && .@len % .@page_size ? 0 : 1; .@foo_len = getarraysize(getarg(2, .@foo$)); copyarray .@foo$[0], getarg(2, .@foo$), .@foo_len; .@foo$[0] = .@foo_len ? .@foo$[0] : "foo"; // This is only here to avoid warnings. do { copyarray .@copy$[0], getelementofarray(getarg(0), .@page_size * .@page), .@page_size; if( .@page < .@pages ) .@copy$[.@page_size] = "Next Page =>"; if( .@page > 0 ) .@copy$[.@page_size +1] = "<= Previous Page"; .@menu = select(implode(.@copy$,":")+( .@foo_len ? ":" + implode(.@foo$,":") : "" )); if( .@menu == .@page_size +1 ) .@page++; else if( .@menu == .@page_size +2 ) .@page--; else if( .@menu > getarraysize(.@copy$) ) return getarraysize(.@copy$) - .@menu; deletearray .@copy$; } while( .@menu > .@page_size ); .@menu += .@page_size * .@page; return .@menu-1; } function script f_timeKeep { function s; set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; .@mes$ = ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" minute"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" second"+ s( .@sec,1 ) : "" ); if ( charat( .@mes$, getstrlen(.@mes$)-1 ) == " " ) .@mes$ = delchar( .@mes$, getstrlen(.@mes$)-1 ); return ( .@mes$ ); function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); } } // By Skorm... Selection Buffer Version 2.2 prontera,150,150,5 script Buffer 100,{ if( @h_last > gettimetick(2) && !.dual_mode || compare(strnpcinfo(2),"set") || !slc_bufs ) goto OnSetBuff; OnBuff: if( @h_last > gettimetick(2) ) end; @h_last = gettimetick(2) + .trigger; .@total = callsub(Sub_PriceCheck); if( .@total > Zeny ) { message strcharinfo(0), "You don't have enough Zeny to buff "+( .dual_mode ? "" : "double ")+"click the "+( .dual_mode ? "Buff Setter" : "Buffer ")+"to modify your selection."; end; } for( .@a = 0; .@a < .len; .@a++ ) if( ( slc_bufs & pow( 2, .@a ) ) ) { switch(.sc_num[.@a]) { case 0: case 1: skilleffect .skil_num[.@a], .levels[.@a]; sc_start .sc_effect[.@a], .ticks[.@a], .levels[.@a]; break; case 2: case 3: sc_start2 .sc_effect[.@a], .ticks[.@a], .skil_num[.@a], .levels[.@a]; break; case 4: sc_start4 .sc_effect[.@a], .ticks[.@a], .skil_num[.@a], .levels[.@a], .sc_arg1[.@a], .sc_arg2[.@a]; break; } message strcharinfo(0),"Buff "+.skil_txt$[.@a]+" Added!"; } Zeny = Zeny - .@total; end; Sub_PriceCheck: for( .@a = 0; .@a < .len; .@a++ ) if( ( slc_bufs & pow( 2, .@a ) ) ) .@total = .@total + .price[.@a]; return .@total; OnSetBuff: .@slc_bufs = slc_bufs; .@total = callsub(Sub_PriceCheck); .@len = getarraysize(.skil_txt$); for (.@i = 0; .@i < .@len; .@i++) .@buffs$[.@i] = "( "+(.@slc_bufs&pow(2,.@i)?"^35a100On":"^FF0000Off")+"^000000 ) [ ^0054ff"+.skil_txt$[.@i]+(.sc_num < 2 ? " Lv"+.levels[.@i] : "")+"^000000 ] "+F_InsertComma(.price[.@i])+"z, "+f_timeKeep(.ticks[.@i]/1000); do { mes .npc_nm$; mes "Select your buffs!"; .@select = f_displayPages(.@buffs$, .page_size, .format$); next; switch( .@select ) { case -1: mes .npc_nm$; mes "Alright, your current total will be "+F_InsertComma(.@total)+"z each time you use my buffing service. Is that ok?"; next; if( select( "Yes:No" ) == 1 ) slc_bufs = .@slc_bufs; break; default: .@total = ( .@slc_bufs & pow( 2, .@select ) ) ? .@total - .price[.@select] : .@total + .price[.@select]; .@slc_bufs = .@slc_bufs ^ pow( 2, .@select ); .@buffs$[.@select] = "( "+(.@slc_bufs&pow(2,.@select)?"^35a100On":"^FF0000Off")+"^000000 ) [ ^0054ff"+.skil_txt$[.@select]+(.sc_num < 2 ? " Lv"+.levels[.@select] : "")+"^000000 ] "+F_InsertComma(.price[.@select])+"z, "+f_timeKeep(.ticks[.@select]/1000); } } while ( .@select > -1 ); end; function add_sc_effect { if(getargcount() <= 6) { .sc_num[.effect_size] = 0; } else if(getargcount() <= 7) { .sc_num[.effect_size] = 2; } else { .sc_num[.effect_size] = 4; } .sc_effect[.effect_size] = getarg(0, SC_INCREASEAGI); .skil_txt$[.effect_size] = getarg(1, "Increase Agi"); .ticks[.effect_size] = getarg(2, 300000); .price[.effect_size] = getarg(3, 1000); .skil_num[.effect_size] = getarg(4, 29); .levels[.effect_size] = getarg(5, 10); .sc_arg1[.effect_size] = getarg(6, 0); .sc_arg2[.effect_size] = getarg(7, 0); .effect_size++; } OnInit: if(compare(strnpcinfo(2),"set")) .dual_mode = 1; .npc_nm$ = "[ "+strnpcinfo(1)+" ]"; // Only the first loaded NPC can continue... if(.len) end; // SC_EFFECT, TEXT, TICKS, PRICE, ARG1(Skill Number), ARG2(Skill Level), ARG3, ARG4; add_sc_effect(SC_INCREASEAGI, "Increase Agi", 300000, 1000, 29, 10); add_sc_effect(SC_BLESSING, "Blessing", 300000, 1000, 34, 10); add_sc_effect(SC_ASSUMPTIO, "Assumptio", 300000, 5000, 361, 5); add_sc_effect(SC_IMPOSITIO, "Impositio", 300000, 5000, 66, 5); add_sc_effect(SC_ANGELUS, "Angelus", 300000, 5000, 33, 5); add_sc_effect(SC_MAGNIFICAT, "Magnificat", 300000, 10000, 74, 5); add_sc_effect(SC_GLORIA, "Gloria", 300000, 10000, 75, 5); add_sc_effect(SC_ARMOR_ELEMENT_EARTH, "Earthproof", 1200000, 10000, 0, 20, -15, 0); setarray .format$, "Done"; // This is the conformation button at the end of the menu. .page_size = 10; // Buffs shown per page. .trigger = 2; // Number of seconds between clicks to not trigger select page. .len = getarraysize(.sc_effect); bindatcmd "setbuff",strnpcinfo(0)+"::OnSetBuff"; bindatcmd "buff",strnpcinfo(0)+"::OnBuff"; } // Any duplicate npc with a hidden name that contains "set" will be considered a buff setter. For Example, set1, set2, or setting are all valid hidden names. // To enable one-npc-mode where double clicking on the same npc allows for buffs to be changed. Just remove all duplicate npcs with "set" in their hidden names. prontera,152,150,4 duplicate(Buffer) Buff Setter#set 100
-
1
-
-
On 12/20/2024 at 2:24 PM, yodaGG said:
Sorry for asking again
,
how to add item buff effect ?
bcs this item have no Skill ID and Level
ex:
Earthproof Potion Item ID# 12120 (Resist_Earth)
{ sc_start4 SC_ARMOR_ELEMENT_EARTH,1200000,0,20,-15,0; },{},{}
Can you test this and let me know if you have any issues. I'll upload it if you give the all clear.
///This function takes an array of strings and builds a menu players can navigate. ///Usage: f_displayPages(.@string_array${, .@page_size {, .@extra_string_array$}}); ///Output: This function returns the selected item index from the given array. function script f_displayPages { .@page_size = getarg(1, 10); .@len = getarraysize(getarg(0)); .@pages = .@len / .@page_size; .@pages -= .@len > .@page_size && .@len % .@page_size ? 0 : 1; .@foo_len = getarraysize(getarg(2, .@foo$)); copyarray .@foo$[0], getarg(2, .@foo$), .@foo_len; .@foo$[0] = .@foo_len ? .@foo$[0] : "foo"; // This is only here to avoid warnings. do { copyarray .@copy$[0], getelementofarray(getarg(0), .@page_size * .@page), .@page_size; if( .@page < .@pages ) .@copy$[.@page_size] = "Next Page =>"; if( .@page > 0 ) .@copy$[.@page_size +1] = "<= Previous Page"; .@menu = select(implode(.@copy$,":")+( .@foo_len ? ":" + implode(.@foo$,":") : "" )); if( .@menu == .@page_size +1 ) .@page++; else if( .@menu == .@page_size +2 ) .@page--; else if( .@menu > getarraysize(.@copy$) ) return getarraysize(.@copy$) - .@menu; deletearray .@copy$; } while( .@menu > .@page_size ); .@menu += .@page_size * .@page; return .@menu-1; } function script f_timeKeep { function s; set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; .@mes$ = ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" minute"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" second"+ s( .@sec,1 ) : "" ); if ( charat( .@mes$, getstrlen(.@mes$)-1 ) == " " ) .@mes$ = delchar( .@mes$, getstrlen(.@mes$)-1 ); return ( .@mes$ ); function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); } } // By Skorm... Selection Buffer Version 2.2 prontera,150,150,5 script Buffer 100,{ if( @h_last > gettimetick(2) && !.dual_mode || compare(strnpcinfo(2),"set") || !slc_bufs ) goto OnSetBuff; OnBuff: if( @h_last > gettimetick(2) ) end; @h_last = gettimetick(2) + .trigger; .@total = callsub(Sub_PriceCheck); if( .@total > Zeny ) { message strcharinfo(0), "You don't have enough Zeny to buff "+( .dual_mode ? "" : "double ")+"click the "+( .dual_mode ? "Buff Setter" : "Buffer ")+"to modify your selection."; end; } for( .@a = 0; .@a < .len; .@a++ ) if( ( slc_bufs & pow( 2, .@a ) ) ) { switch(.sc_num[.@a]) { case 0: case 1: skilleffect .skil_num[.@a], .levels[.@a]; sc_start .sc_effect[.@a], .ticks[.@a], .levels[.@a]; break; case 2: case 3: sc_start2 .sc_effect[.@a], .ticks[.@a], .levels[.@a], .sc_arg1[.@a]; break; case 4: sc_start4 .sc_effect[.@a], .ticks[.@a], .levels[.@a], .sc_arg1[.@a], .sc_arg2[.@a]; break; } message strcharinfo(0),"Buff "+.skil_txt$[.@a]+" Added!"; } Zeny = Zeny - .@total; end; Sub_PriceCheck: for( .@a = 0; .@a < .len; .@a++ ) if( ( slc_bufs & pow( 2, .@a ) ) ) .@total = .@total + .price[.@a]; return .@total; OnSetBuff: .@slc_bufs = slc_bufs; .@total = callsub(Sub_PriceCheck); .@len = getarraysize(.skil_txt$); for (.@i = 0; .@i < .@len; .@i++) .@buffs$[.@i] = "( "+(.@slc_bufs&pow(2,.@i)?"^35a100On":"^FF0000Off")+"^000000 ) [ ^0054ff"+.skil_txt$[.@i]+(.sc_num < 2 ? " Lv"+.levels[.@i] : "")+"^000000 ] "+F_InsertComma(.price[.@i])+"z, "+f_timeKeep(.ticks[.@i]/1000); do { mes .npc_nm$; mes "Select your buffs!"; .@select = f_displayPages(.@buffs$, .page_size, .format$); next; switch( .@select ) { case -1: mes .npc_nm$; mes "Alright, your current total will be "+F_InsertComma(.@total)+"z each time you use my buffing service. Is that ok?"; next; if( select( "Yes:No" ) == 1 ) slc_bufs = .@slc_bufs; break; default: .@total = ( .@slc_bufs & pow( 2, .@select ) ) ? .@total - .price[.@select] : .@total + .price[.@select]; .@slc_bufs = .@slc_bufs ^ pow( 2, .@select ); .@buffs$[.@select] = "( "+(.@slc_bufs&pow(2,.@select)?"^35a100On":"^FF0000Off")+"^000000 ) [ ^0054ff"+.skil_txt$[.@select]+(.sc_num < 2 ? " Lv"+.levels[.@select] : "")+"^000000 ] "+F_InsertComma(.price[.@select])+"z, "+f_timeKeep(.ticks[.@select]/1000); } } while ( .@select > -1 ); end; function add_sc_effect { if(getargcount() <= 6) { .sc_num[.effect_size] = 0; } else if(getargcount() <= 7) { .sc_num[.effect_size] = 2; } else { .sc_num[.effect_size] = 4; } .sc_effect[.effect_size] = getarg(0, SC_INCREASEAGI); .skil_txt$[.effect_size] = getarg(1, "Increase Agi"); .ticks[.effect_size] = getarg(2, 300000); .price[.effect_size] = getarg(3, 1000); .skil_num[.effect_size] = getarg(4, 29); .levels[.effect_size] = getarg(5, 10); .sc_arg1[.effect_size] = getarg(6, 0); .sc_arg2[.effect_size] = getarg(7, 0); .effect_size++; } OnInit: if(compare(strnpcinfo(2),"set")) .dual_mode = 1; .npc_nm$ = "[ "+strnpcinfo(1)+" ]"; // Only the first loaded NPC can continue... if(.len) end; // SC_EFFECT, TEXT, TICKS, PRICE, ARG1(Skill Number), ARG2(Skill Level), ARG3, ARG4; add_sc_effect(SC_INCREASEAGI, "Increase Agi", 300000, 1000, 29, 10); add_sc_effect(SC_BLESSING, "Blessing", 300000, 1000, 34, 10); add_sc_effect(SC_ASSUMPTIO, "Assumptio", 300000, 5000, 361, 5); add_sc_effect(SC_IMPOSITIO, "Impositio", 300000, 5000, 66, 5); add_sc_effect(SC_ANGELUS, "Angelus", 300000, 5000, 33, 5); add_sc_effect(SC_MAGNIFICAT, "Magnificat", 300000, 10000, 74, 5); add_sc_effect(SC_GLORIA, "Gloria", 300000, 10000, 75, 5); add_sc_effect(SC_ARMOR_ELEMENT_EARTH, "Earthproof", 1200000, 10000, 0, 20, -15, 0); setarray .format$, "Done"; // This is the conformation button at the end of the menu. .page_size = 10; // Buffs shown per page. .trigger = 2; // Number of seconds between clicks to not trigger select page. .len = getarraysize(.sc_effect); bindatcmd "setbuff",strnpcinfo(0)+"::OnSetBuff"; bindatcmd "buff",strnpcinfo(0)+"::OnBuff"; } // Any duplicate npc with a hidden name that contains "set" will be considered a buff setter. For Example, set1, set2, or setting are all valid hidden names. // To enable one-npc-mode where double clicking on the same npc allows for buffs to be changed. Just remove all duplicate npcs with "set" in their hidden names. prontera,152,150,4 duplicate(Buffer) Buff Setter#set 100
-
On 12/20/2024 at 2:24 PM, yodaGG said:
Sorry for asking again
,
how to add item buff effect ?
bcs this item have no Skill ID and Level
ex:
Earthproof Potion Item ID# 12120 (Resist_Earth)
{ sc_start4 SC_ARMOR_ELEMENT_EARTH,1200000,0,20,-15,0; },{},{}
I don't think there's an option for that. I'll find time to add it tomorrow.
-
1
-
-
6 hours ago, yodaGG said:
anyone know how to split this buff to 2 NPC ?
1. For do buff
1. for setting the buffIf there is an NPC with "set" in the hidden part of its name then duplicate NPCs without set in their name are buffers and ones with it are setters. Granted in retrospect this is a little annoying because you can only ever have the two system or the one system on a server never both via duplicates.
Here is an example of a setter NPC.
// Any duplicate npc with a hidden name that contains "set" will be considered a buff setter. For Example, set1, set2, or setting are all valid hidden names. // To enable one-npc-mode where double clicking on the same npc allows for buffs to be changed. Just remove all duplicate npcs with "set" in their hidden names. prontera,152,150,4 duplicate(Buffer) Buff Setter#set 100
-
1
-
1
-
-
14 hours ago, Mice said:
I think this is possible, but it requires source modification to identify whether an item has been refined from an enriched elu. This can also be done through scripting, but there’s a potential issue: if the item is traded, the variable added in the script might be lost, which could result in the bonus stats disappearing.
Not necessarily you could give the enhancement incrementally +10 to all stats for each refine with enriched elunium or if you really want the effect to happen all at once you could give it a stat bonus of +0 all stats until +10. Remove the +0 stat bonus if the refine it with normal elunium. Weapon bonuses can be 0 but are still set and retained through trades etc.
-
3 hours ago, zeusc137 said:
Hello everyone!
I would like to kill all the slaves from a MVP, like when Baphomet summons its Baphomet Jrs, in this case I would like to kill the slaves and leave my Baphomet alive.getunitdata(getnpcid(0), 'd); // Invoca o MVP configurado = 2100 Baphomet in this example: monster 'map$,'d[UNPC_X],'d[UNPC_Y],"MVP Test",2100,1,instance_npcname("MVP Invoker#1")+"::OnMyMobDead";
Can I use "getunitdata" to retrieve the slaves from this MVP and kill only those?
I also have the MVP ID so it would work if I could kill like this:killallexcept <MOB_ID_TO_AVOID>;
Thanks for your time! Have a good one!
The problem with this approach is what's stopping the A.I. from summoning more slaves? Wouldn't recommend having a loop.
I like the command idea, but I think this is the wrong application for it.
What would be better is my previous suggestion of a completely different duplicate mob that doesn't spawn slaves. This is pretty simple to achieve with mob_avail.
You can also look into adding a new mapflag that prevents summoning slaves on a map: `mf_monster_noslaves`
Honestly summoning slaves might be a skill that mobs use so maybe you could use the restricted map flag. I'm not entirely sure if that applies to mobs though.-
1
-
-
3 hours ago, zeusc137 said:
Hello! Thanks for the feedback, @Skorm! I wasn’t aware of “topic hijacking” — sorry about that!
I thought adding more information to existing posts would be helpful, but I can see how it might be misleading.
Thank you very much for the tip!
EDIT: I also created my own post/question related to this after your tip:
Thanks it's mainly for the search engines. What if someone else has the same question as you? They wouldn't find it buried under this topic. While your question might be related, it isn't exactly the same.
-
1
-
-
On 10/30/2024 at 10:49 PM, zeusc137 said:
Hello sir!
Hello! Thanks for this excelente idea!
Do you have a suggestion where I can kill ALL MONSTER EXCEPT ONE?
I am trying to invoke the MVP's without their slaves(like Baphomet without Baphomet Junior) but I tried so much and couldn't find a good way yet...So I'm thinking if I could kill all the slaves(Baphomet Jr for example) and leave the MVP(Baphomet) alive...
Be safe! Thanks!
This is topic hijacking btw.
I would recommend creating another version of the MVPs without the slave spawns. -
On 9/20/2024 at 1:54 PM, FrajolazitoH said:
//Modified by - PandaLovesHamster //Custom Guild Limiter //Credits to the owners of the individual makers of the script, I just tied them all together to create this script sec_in01,99,187,4 script Limitador de Guilda 833,{ // this part registers the guild function sf { function s; .@a = getarg(2); .@len = getarg(3); return ( sprintf( getarg(0), s(.@a, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)) ) +(( .@a+1 < .@len )?":Next":":") +(( .@a-11 > 0 )?":Back":":") +":Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { .@name$ = getguildname(getelementofarray(getarg(2),getarg(0))); return .@name$=="null"?"":.@name$; } }; }; function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); }; function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); }; if(getgmlevel()>=80 ) { mes .Npc_Name$; mes "Olá Sr. GM, o que você gostaria de fazer?"; next; switch( select("Adicionar/Remover Guildas:Limpar Dados da Guilda:Menu do Jogador:Cancelar") ) { case 1: mes .Npc_Name$; mes "Gostaria de adicionar ou remover uma guilda?"; .@a_len = getarraysize($App_Guilds); .@format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; next; if( select("- Remover:- Adicionar") == 1 ) { while( .@a != 9999 ) { select( sf( .@format$, $App_Guilds, .@a, .@a_len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@a_len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; mes .Npc_Name$; mes "Você selecionou ^0000FF["+getguildname($App_Guilds[.@select])+"]^000000 guilda. Você gostaria de removê-los das guildas aceitas?"; next; if( select("sim:não") == 1 ) { deletearray($App_Guilds[.@select],1); mes .Npc_Name$; mes "A guilda foi removida com sucesso!"; } close; } } } else { mes .Npc_Name$; mes "Por favor, insira o nome da guilda ou o nome do Lider."; next; input(.@input$); .@len = query_sql( "Select `guild_id` from `guild` where `name` like '%"+escape_sql(.@input$)+"%' or `master` like '%"+escape_sql(.@input$)+"%';",.@guild_id ); while( .@a != 9999 ) { select( sf( .@format$, .@guild_id, .@a, .@len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; .@a_len = getarraysize($App_Guilds); for(.@b=0;.@b<.@a_len;.@b++) if( $App_Guilds[.@b]==.@guild_id[.@select] ) { mes .Npc_Name$; mes "Você selecionou ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guilda. Sinto muito guilda já foi adicionada, mas à lista de aceitos."; close; } mes .Npc_Name$; mes "Você selecionou ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guilda. Você gostaria de adicioná-los às guildas aceitas?"; next; if( select("Sim:Não") == 1 ) { .@a_len = getarraysize($App_Guilds); if( .@a_len>=128 ) { mes .Npc_Name$; mes "Desculpe, mas a lista de aceitos está cheia, por favor, abra espaço e tente novamente..."; } else { mes .Npc_Name$; mes "TA guilda foi adicionada com sucesso!"; $App_Guilds[.@a_len] = .@guild_id[.@select]; } } close; } } } case 2: mes .Npc_Name$; mes "Tem certeza de que deseja limpar os dados da guilda?!"; next; if( select("Sim!:Não!")==1 ) { mes .Npc_Name$; mes "Esta é sua última chance. Você tem certeza tão certo quanto pode ser?"; next; if( select("Grosseiro!:Não, espere... Onde estou?!!")==1 ) deletearray($App_Guilds); } if( @menu==1 ) { mes .Npc_Name$; mes "A ação está feita..."; } else { mes .Npc_Name$; mes "Uau, isso foi perto... Tenha um bom dia!"; } close; case 3: break; case 4: mes .Npc_Name$; mes "Tudo bem, tenha um bom dia!"; close; } } .@len = getarraysize($App_Guilds); for( .@i=0; .@i <= .@len; .@i++ ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } // Esta parte ejeta os jogadores quando eles estão no mapa OnPCLoadMapEvent: if( getcharid(2) == $App_Guilds[.@i] ){ .count = 0; .@origin = getcharid(3); addrid 3, 0, getcharid(2); if ( strcharinfo(3) == .checkmap$ ) .count++; if ( !.@origin ) end; if ( .count > 20 ) { // 5 significa apenas 5 jogadores por guilda permitidos em um mapa message strcharinfo(0), "Os membros da sua guilda estão acima do limite permitido pela satff."; sleep2 2000; warp "SavePoint", 0,0; } } end; OnInit: setarray .@checkmap$, "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05", "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05"; .@len = getarraysize( .@checkmap$ ); for ( .@i = 0; .@i < .@size; .@i++ ) { setmapflag .@checkmap$[.@i], mf_loadevent; setd "."+ .@checkmap$[.@i], 1; } end; } - script kjdhfkjshf -1,{ OnPCLoadMapEvent: if ( getmapflag( strcharinfo(3), mf_gvg_castle ) && ( agitcheck() || agitcheck2() )) { .@len = getarraysize($App_Guilds); for( .@i=0; .@i <= .@len; .@i++ ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } if( .@Guild_Check < 1 ) { dispbottom "Sua guilda ainda não foi aprovada, entre em contato com os GMs"; sleep2 3000; warp "SavePoint",0,0; end; } if( !getcharid(2) ) { dispbottom "Desculpe, apenas membros de uma guilda podem entrar em um castelo."; sleep2 3000; warp "SavePoint",0,0; end; } } end; OnInit: setarray .castles$[0], "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; for ( .@i = 0; .@i < 30; .@i++ ) setmapflag .castles$[.@i], mf_loadevent; end; }
whenever I add or remove a guild, the NPC shows me the same guild twice. This ends up buggy when removing a guild from the registry. I click on remove guild "X" and guild "Y" is removed from the registry. can anyone help me?
This is a stupid bug what the early sf function I made. Replace it with f_DisplayPages. You should be able to find it with a quick search on rAthena.
-
@Dolphin86 This is a problem I've run into when accessing an NPC that is on a map you're not on. Instead of "end" you could try "close". Or just warp the player where they are and it'll unstuck them.
-
I'm just now seeing this and don't have the time to test things out, but I've had problems warping players with similar BG scripts. I can't exactly remember what the problem was because its been years, but you should try collecting all of the players cids/aids for each team and then warping them individually instead of mapwarp/partywarp.
-
1
-
-
Oh I love this! Fantastic script idea.
-
15 hours ago, Mitosky said:
not work for me :c
- script loginnnnnn -1,{ OnPCLoginEvent: announce strcharinfo(0) + " Logged in.",bc_all; end; }
-<tab>script<tab>loginnnnnn<tab>-1,{
-
1
-
-
On 3/20/2024 at 10:56 PM, vitcunha said:
Do you have very old clients or emulators lying around? Maybe that old hard drive with RO stuff? How about those old CD-Rs on the shelf? Or are you simply a RO data hoarder?
WE WANT YOU!
Hi, I’m vit. I’m developing along with o oldinroplayer a *Ragnarok Online Cross-Episode Database*, called RagnaDB.
It’s a db in which you’re able to choose a specific episode and we’ll show you all the info precisely as it was back in the day. The idea is for it to be the “one RO database to rule them all”.
For this to exist, there’s a great deal of historical research and digital data scavenging involved. Since we’re committed to historical accuracy, we’re on a journey to finding old files (client and server) to feed the db with, as well as (old) reliable sources for data validation.If you were waiting for the right moment to shine and looking for a group of people who will truly appreciate and see value in those dozens of RO gigabytes collecting dust like no one ever had, this is the moment! We’ll love to have you!
If any of the words above piqued your interest, you’re more than welcome here. Join our Discord to hear about the latest updates or just hang around!
Our Discord: https://discord.gg/cueAdED64NRagnaDB: https://ragnadb.com/
I love the concept also the site is very responsive and minimal, but includes all of the data and shortcuts to it you might expect. Keep up the good work.
-
Search for "MVP ladder" you will find plenty of scripts that do just this.
-
1
-
-
If you're looking for something clientside there are various launchers with some serverside communication. For example rgzlauncher. You'd need to send a custom packet/message to the launcher which exists at the same time as the client and then run the application from that launcher. You could also just create your own launcher which does something similar.
-
1
-
-
44 minutes ago, Dolphin86 said:
@Skorm well what i plan to do was player will do some activity example, crafting weapon, once player had succesfully craft the desire weapon, he will get crafting points, now if player wish to view his current point he will use an infinate item that will recall an npc / script which will show all of his current points, ( weapon craft, armor craft, etc)
and player can also spend his current points to unlock new stuff, example 100 weapon crafting can be spend to unlock bonus +10 dmg (i am using an etc item as indicator of player which will detect on the crafting sytem npc that will open a feature where player can craft +10 dmg weapons, but if i understand this point system i would just use the points instend of items, but i am worry if the points would be reset, when server reboot, restart or stop...)
I'm pretty sure detecting if a player produced an item requires a source mod probably with an event similar to the OnPC events.
-
On 3/16/2024 at 9:50 AM, Dolphin86 said:
how to spend the points?
The points are just a custom temporary character variable.
rathena/doc/script_commands.txt at master · rathena/rathena · GitHub
I think it might be more appropriate to use a permanent character variable for that instead.
This is how you can define a shop that uses the custom points.
rathena/doc/script_commands.txt at master · rathena/rathena · GitHub
Here it describes how the different shop points are used.
rathena/doc/script_commands.txt at master · rathena/rathena · GitHub
@Racaae's answer shows pretty clearly how you can do something from an item.
"Task" is very vague. What do you want the player to do specifically? -
@Tero Great stuff. I love your enthusiasm for modding and learning. Wish we all still had it.
Keep it up.
-
四千九百六十八
-
1
-
-
@xilence01 Updated! You should @ me next time.
-
1
-
1
-
-
Fantastic work again @Tokei!
[Showcase] - Tree of Savior!
in Maps & 3D Modeling Showcase
Posted
Nice work! You scaled it very well to RO.