-
Posts
2407 -
Joined
-
Last visited
-
Days Won
52
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Capuche
-
Find and replace all bat_c01 by your map's name bat_c02 and batc01wall by batc02wall (wall's name) and I think you must change the bg id too .red = 3; // red team bg ID .blue = 4; // blue team bg ID by .red = 5; // red team bg ID .blue = 6; // blue team bg ID + NPC's name. That's all
-
Getcharid Use Getpartymember to get the account ID of the member. Make a loop, attach the member of the party to the script with Attachrid + check his distance with Getmapxy + Distance
-
I think you just have to replace all lastwarp by #lastwarp and lastwarp_array by #lastwarp_array
-
Try defpattern with an hide NPC. Works only in the range of the NPC http://www.eathena.ws/wiki/index.php?title=Defpattern An example trunk/doc/sample/npc_test_pcre.txt
-
1/ SQL part and errors Error Message: You already have a `account_type` column in login or you load the alter SQl twice. Don't worry about this Strange I don't have this kind of error. - Make an @reloadscript just in case. - Reload the sql table one by one. CREATE TABLE IF NOT EXISTS `vip_bronze` ( `account_id` int(11) unsigned NOT NULL default '0', `account_name` varchar(255) NOT NULL default 'NULL', `start_date` datetime NOT NULL default '0000-00-00 00:00:00', `end_date` datetime NOT NULL default '0000-00-00 00:00:00', `status` varchar(255) NOT NULL DEFAULT 'NULL', PRIMARY KEY (`account_id`) ) ENGINE=MyISAM; table silver CREATE TABLE IF NOT EXISTS `vip_silver` ( `account_id` int(11) unsigned NOT NULL default '0', `account_name` varchar(255) NOT NULL default 'NULL', `start_date` datetime NOT NULL default '0000-00-00 00:00:00', `end_date` datetime NOT NULL default '0000-00-00 00:00:00', `status` varchar(255) NOT NULL DEFAULT 'NULL', PRIMARY KEY (`account_id`) ) ENGINE=MyISAM; table gold CREATE TABLE IF NOT EXISTS `vip_gold` ( `account_id` int(11) unsigned NOT NULL default '0', `account_name` varchar(255) NOT NULL default 'NULL', `start_date` datetime NOT NULL default '0000-00-00 00:00:00', `end_date` datetime NOT NULL default '0000-00-00 00:00:00', `status` varchar(255) NOT NULL DEFAULT 'NULL', PRIMARY KEY (`account_id`) ) ENGINE=MyISAM; 2/ Questions You only need 1 item (Holy Egg (12703) here) to upgrade the account into bronze/silver/gold. Each time you click on the item, you can upgrade the account into the next state and the item is delete. - Your account is normal --> bronze - Your account is bronze --> silver - silver --> gold - gold -- > you can't upgrade your account (limit reach) You also can upgrade the account speaking with the NPC (required the item in your inventory). But don't forget to set this option in the NPC set .item_premium, 501; // ID item to upgrade your account to bronze/silver/gold Just put enough day when you change the account (3000 days is enough?) You also can set the expired delay in the item callfunc( "VIP_upgrade", 7, 12703 ); /* 7 days, item ID to delete */ Last revision : http://pastebin.com/raw.php?i=A45Z7Kfx
-
can I request script GUILD online member check
Capuche replied to Famous's question in Script Requests
You're right I made some mistakes The previous post is now edited -
EDIT previous post
-
I don't have any error Maybe you use eA or other emu - script oneideaforthename? -1,{ OnPCLoginEvent: OnPCBaseLvUpEvent: if( getgmlevel() > 2 ) end; if( getstrlen( $highest_level$ ) ) explode( .@h$, $highest_level$, "|" ); if( BaseLevel > atoi( .@h$ ) ) { set .@h$, BaseLevel; set .@h$[1], strcharinfo(0); announce "[ "+ strcharinfo(0) +" ] ("+ BaseLevel +") has the highest level in the serveur !", 0; } else if( .@h$[1] == strcharinfo(0) && BaseLevel < atoi(.@h$) ) { set .@h$, 0; set .@h$[1], ""; } set $highest_level$, implode( .@h$, "|" ); end; } If you have some error, post a screen of your mapserver when the errors appear or explain what happens in game
-
Replace in atcommand.c ACMD_FUNC(refresh) { nullpo_retr(-1, sd); clif_refresh(sd); return 0; } by ACMD_FUNC(refresh) { nullpo_retr(-1, sd); if (map[sd->bl.m].flag.gvg_castle) { clif_displaymessage(sd->fd,"@refresh disabled on GvG castle."); return -1; } clif_refresh(sd); return 0; } Or You also can restrict @refresh with NPC script command, *just load this script like another script NPC and reloadscript - script hjklm -1,{ OnInit: bindatcmd "refresh",strnpcinfo(0) +"::OnRefresh"; end; OnRefresh: if( getmapflag( strcharinfo(3),mf_gvg_castle ) ) message strcharinfo(0),"@refresh is disabled on gvg castle."; end; }
-
Maybe with source edit
-
You show us the wrong NPC
-
A custom wing give lokis veil to clown and gypsy class, which can get the skill on skill tree..? strange or I didn't understand
-
function script rand__ { .@range = getarg(0); .@count = getarg(2, 0); if ( !.@count || .@count > .@range ) .@count = .@range; else if ( .@count > 128 ) .@count = 128; while ( .@i < .@count ) { .@r = .@save = rand( .@i, .@range -1 ) ; if ( !getd( ".@tmp1_"+ .@i ) ) { .@r = ( getd(".@tmp1_"+ .@r ) )? getd( ".@tmp2_"+ .@r ) : .@r; setd ".@tmp2_"+ .@i, .@r; setd ".@tmp2_"+ .@save , .@i; setd ".@tmp1_"+ .@save , 1; set getelementofarray( getarg(1), .@i ), .@r; if ( .@save < .@count ) set getelementofarray( getarg(1), .@save ), .@i; } .@i++; } return .@count; } prontera,149,167,5 script bg_emp_register 100,{ end; OnStart: getmapxy .@map$, .@x, .@y, 1; warpwaitingpc .@map$, .@x, .@y; callfunc "rand__", .minplayer2start *2, $@rand; for ( .@i = 0; .@i < $@warpwaitingpcnum; .@i++ ) setbgid ( .@i % 2 )? .red : .blue, $@warpwaitingpc[ $@rand[.@i] ]; delwaitingroom strnpcinfo(0); bg_warp .red, "bat_c01", 50,124; bg_warp .blue, "bat_c01", 149,59; setwall "bat_c01",54,122,6,7,0,"batc01wall_a"; setwall "bat_c01",55,122,5,7,0,"batc01wall_b"; setwall "bat_c01",140,56,6,7,0,"batc01wall_c"; setwall "bat_c01",140,57,5,7,0,"batc01wall_d"; bg_updatescore "bat_c01", 0, 0; sleep 6000; areapercentheal "bat_c01",50,123,58,131,100,100; areapercentheal "bat_c01",141,52,149,60,100,100; mapannounce "bat_c01", "Rules are simple. The first one to break the opponent's emperium will get a score.", 0; sleep 3000; mapannounce "bat_c01", "Score "+ .winningscore +" rounds to win ! ... GET READY", 0; setwall "bat_c01",51,121,2,4,0,"batc01wall_e"; setwall "bat_c01",50,120,1,2,0,"batc01wall_f"; setwall "bat_c01",148,62,2,0,0,"batc01wall_g"; setwall "bat_c01",149,63,1,2,0,"batc01wall_h"; while (1) { for ( .@i = 5; .@i > 0; .@i-- ) { mapannounce "bat_c01","[ "+ .@i +" ]", 0; sleep 1000; } if ( .score[1] == .winningscore -1 && .score[2] == .winningscore -1 ) mapannounce "bat_c01", "Final Round start!", 0; else mapannounce "bat_c01", "Round "+ .round++ +" Start!", 0; bg_monster .red,"bat_c01",50,131, "--ja--",1915, strnpcinfo(0)+"::OnRedDown"; bg_monster .blue,"bat_c01",149,52, "--ja--",1914, strnpcinfo(0)+"::OnBlueDown"; delwall "batc01wall_a"; delwall "batc01wall_b"; delwall "batc01wall_c"; delwall "batc01wall_d"; if ( .score[1] != .winningscore || .score[2] != .winningscore ) sleep .eventlasting * 1000; .score[ .winside ]++; bg_updatescore "bat_c01", .score[1], .score[2]; killmonster "bat_c01", strnpcinfo(0)+"::OnRedDown"; killmonster "bat_c01", strnpcinfo(0)+"::OnBlueDown"; if ( .winside && .empkiller$ != "" ) mapannounce "bat_c01","[ "+ .empkiller$ +" ] has Destroy "+( ( .winside == 1 )?"Blue":"Red" )+" Team's Emperium. "+( ( .winside == 1 )?"Red":"Blue" )+" Team score a point !", 0; if ( .score[1] == .winningscore || .score[2] == .winningscore || !.winside ) break; sleep 5000; bg_warp .red, "bat_c01", 50,124; bg_warp .blue, "bat_c01", 149,59; setwall "bat_c01",54,122,6,7,0,"batc01wall_a"; setwall "bat_c01",55,122,5,7,0,"batc01wall_b"; setwall "bat_c01",140,56,6,7,0,"batc01wall_c"; setwall "bat_c01",140,57,5,7,0,"batc01wall_d"; .winside = 0; .empkiller$ = ""; sleep 1000; } if ( .winside ) { mapannounce "bat_c01", "[ "+( ( .winside == 1 )?"Red":"Blue" )+" Team] won !", 0; getbgusers ( .winside == 1 )? .red : .blue; for ( .@i = 0; .@i < $@arenamembersnum; .@i++ ) getitem .rewarditem[0], .rewarditem[1], $@arenamembers[.@i]; // item reward } else mapannounce "bat_c01", "Time Out. Aborting the match.", 0; sleep 5000; bg_warp .red, "prontera", 155,182; bg_warp .blue, "prontera", 158,182; bg_kickall .red; bg_kickall .blue; delwall "batc01wall_a"; delwall "batc01wall_b"; delwall "batc01wall_c"; delwall "batc01wall_d"; delwall "batc01wall_e"; delwall "batc01wall_f"; delwall "batc01wall_g"; delwall "batc01wall_h"; .round = .winside = .score[0] = .score[1] = .score[2] = 0; .empkiller$ = ""; waitingroom "BG Emperium", .minplayer2start*2 +1, strnpcinfo(0) +"::OnStart", .minplayer2start*2; end; OnRedDown: callsub L_EmpDown, 2; OnBlueDown: callsub L_EmpDown, 1; L_EmpDown: .empkiller$ = strcharinfo(0); .winside = getarg(0); awake strnpcinfo(0); end; OnRedQuit: callsub L_quit, .red, "Red", 2; OnBlueQuit: callsub L_quit, .blue, "Blue", 1; L_quit: if ( bg_get_data( getarg(0), 0 ) ) end; mapannounce "bat_c01", "All "+ getarg(1) +" team members has Quit !", 0; .score[ getarg(2) ] = .winningscore -1; .winside = getarg(2); awake strnpcinfo(0); end; OnRedDead: // showdigit 5,3; // doesn't work properly sleep2 1000; for( .@i = 5; .@i > 0; .@i-- ) { announce "[ "+ .@i +" ]", bc_self; sleep2 1000; } percentheal 100,100; warp "bat_c01",60,121; end; OnBlueDead: sleep2 1000; for( .@i = 5; .@i > 0; .@i-- ) { announce "[ "+ .@i +" ]", bc_self; sleep2 1000; } percentheal 100,100; warp "bat_c01",139,62; // sleep2 1250; // percentheal 100,100; end; OnInit: .red = 3; // red team bg ID .blue = 4; // blue team bg ID set .minplayer2start, 1; // minimum player to start setarray .rewarditem, 501, 1; // reward to the winning team set .winningscore, 2; // final score to win set .eventlasting, 1200; // abort the system if there's no progress, 1200 seconds = 20 mins .red = createbgid("bat_c01", 50,121, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead"); .blue = createbgid("bat_c01", 149,63, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead"); waitingroom "BG Emperium", .minplayer2start*2 +1, strnpcinfo(0) +"::OnStart", .minplayer2start*2; // reloadscript debug delwall "batc01wall_a"; delwall "batc01wall_b"; delwall "batc01wall_c"; delwall "batc01wall_d"; delwall "batc01wall_e"; delwall "batc01wall_f"; delwall "batc01wall_g"; delwall "batc01wall_h"; end; } bat_c01 mapflag battleground 2 bat_c01 mapflag nosave SavePoint bat_c01 mapflag nowarp bat_c01 mapflag nowarpto bat_c01 mapflag noteleport bat_c01 mapflag nomemo bat_c01 mapflag nopenalty bat_a01 mapflag nobranch bat_a01 mapflag noicewall
-
This setting is at the end of the script OnInit: setarray .Rebirth[0],99,50; // Minimum base level, job level to rebirth OR change to third class setarray .JobReq[0],10,40; // Minimum job level to turn into 1st class, 2nd class set .ThirdClass,1; // Enable third classes? (1: yes / 0: no)
-
Try this http://pastebin.com/raw.php?i=AebykAhj
-
prontera,159,187,4 script Server Uptime 858,{ function Add_Zero; function Add_S; mes "[Uptime]", "The server has been online for ", ((.t[1])?Add_S(.t[1],"day")+", ":"")+ ((.t[2])?Add_S(.t[2],"hour")+", ":"")+ ((.t[2]||.t[3])?Add_S(.t[3],"minute")+" ":"")+ ((getarraysize(.t)>2)?"and ":"")+Add_S(.t[4],"second")+", "+ "and counting!"; close; function Add_Zero { return ((getarg(0)<10)?"0":"")+getarg(0); } function Add_S { return "^0055FF"+getarg(0)+" "+getarg(1)+((getarg(0)==1)?"":"s")+"^000000"; } OnInit: set .t[0], gettimetick(2); // set .t[0], gettimetick(2) - 3600*24 + 10; waitingroom " [ 00:00:00 ]",0; initnpctimer; end; OnTimer990: set .@t, gettimetick(2)-.t[0]; set .t[1], .@t/(3600*24); set .t[2], ( .@t%(3600*24) )/3600; set .t[3], (( .@t%(3600*24) )%3600 )/60; set .t[4], (( .@t%(3600*24) )%3600 )%60; end; OnTimer995: initnpctimer; delwaitingroom; waitingroom " [ "+Add_Zero(.t[1])+":"+Add_Zero(.t[2])+":"+Add_Zero(.t[3])+":"+Add_Zero(.t[4])+" ]",0; end; }
-
- script hjklm -1,{ OnPCLoginEvent: while(1) { sleep2 5000; if ( strcharinfo(3) == .map_hourly$ && checkidle() < 60 * .afk_time ) { .@loop++; if( .@loop == 12 * 60 ) {// 1h getitem .item_gain, .item_num; .@loop = 0; } } else .@loop = 0; } OnInit: .item_gain = 501; // Item ID gained .item_num = 1; // number item gained .afk_time = 5; // afk restriction 5 min .map_hourly$ = "prontera"; // map restriction end; }
-
prontera,110,353,4 script Landlord 833,{ set .@n$,"[Landlord]"; set .@GID,getcharid(2); if(getgdskilllv(.@GID,10000) < 1) goto L_GSTL; if(strcharinfo(0)!=getguildmaster(.@GID)) goto L_NGM; query_sql "SELECT `guild_lv`,`max_member` FROM `guild` WHERE `guild_id`="+getcharid(2)+"",@glvl,@max_member; if(@glvl < 10 || @max_member < 5) goto L_GLTL; mes .@n$; mes "Hello and Welcome "+strcharinfo(0)+"."; mes "I rent Guildhouses to Guilds and their Members."; mes "Are you interessted?"; next; menu "Yes, i am!",-,"More Infos please.",L_I,"No, thanks.",L_C; if(.@GID == $FlagID1 || .@GID == $FlagID2 || .@GID == $FlagID3 || .@GID == $FlagID4 || .@GID == $FlagID5 || .@GID == $FlagID6) goto L_GGH; L_next2: mes .@n$; mes "Allright, so you would like to rent a Guildhouse for 1 week, is that correct?"; next; menu "Jes, rent for 1 week",-,"No, i've changed my mind.",L_next2,"Cancel",L_C; L_CLP: mes .@n$; mes "Which Password would you like to use?"; mes "^FF0000IMPORTANT! THIS PASSWORD IS MEANT ONLY FOR YOU, THE GUILD LEADER!!!"; mes "WITH THIS PASSWORD YOU CAN MANAGE THE GUILDHOUSE!^000000..."; input .@gh_lpw$; if(.@gh_lpw$=="")goto L_NP; mes "Allright, so you would like to use this password "+.@gh_lpw$+" as Leaderpassword?"; next; menu "Yes, use "+.@gh_lpw$+" as ^FF0000LEADER^000000 Password!",-,"No, i've changed my mind.",L_CLP,"Cancel",L_C; L_CMP: mes .@n$; mes "Which Visitor-Password would you like to use?"; mes "This is the Password your Guildmembers get to enter the House!!!"; input .@gh_mpw$; if(.@gh_mpw$=="")goto L_NP; next; menu "Yes, use "+.@gh_mpw$+" as Visitor-Password!",-,"No, i've changed my mind.",L_CMP,"Cancel",L_C; mes .@n$; mes "Allright, now let me see which Guildhouse is free."; next; if($house1_rent!=1)goto L_rent1; if($house2_rent!=1)goto L_rent2; if($house3_rent!=1)goto L_rent3; if($house4_rent!=1)goto L_rent4; if($house5_rent!=1)goto L_rent5; if($house6_rent!=1)goto L_rent6; mes .@n$; mes "I'm sorry to tell you, but all Guildhouses are being used."; mes "Why don't you just come back again in a few Days and try it again."; close; L_rent1: mes .@n$; mes "House Nr. 1 is free."; mes "Renting Fee: "+ .item_num +" "+ getitemname( .item_req ) +" for 1 week."; mes "LEADER Password: "+.@gh_lpw$+""; mes "Visitor-Password(for your Guildmembers): "+.@gh_mpw$+""; mes "Would you like to buy the Guildhouse now?"; next; menu "Yes, please.",-,"No, i've changed my mind.",L_C; mes .@n$; mes "Ok I'll make the papers ready."; next; if( countitem( .item_req ) < .item_num ) goto L_NEZ; delitem .item_req, .item_num; set $house1_rent,1; set $house1_leader$,strcharinfo(0); set $house1_guild$,strcharinfo(2); set $house1_lpw$,.@gh_lpw$; set $house1_mpw$,.@gh_mpw$; set $house1_buy_day,gettime(5) + 7; // set $house1_buy_month,gettime(6)+.@months; set $FlagID1,.@GID; mes .@n$; mes "Congratulations "+strcharinfo(0)+","; mes "the Guildhouse now belongs to you and your Guild "+strcharinfo(2)+"!"; mes "Your Guildhouse Number is Nr 1."; mes "Have Fun!"; close; L_rent2: mes .@n$; mes "House Nr. 2 is free."; mes "Renting Fee: "+ .item_num +" "+ getitemname( .item_req ) +" for 1 week."; mes "LEADER Password: "+.@gh_lpw$+""; mes "Visitor-Password(for your Guildmembers): "+.@gh_mpw$+""; mes "Would you like to buy the Guildhouse now?"; next; menu "Yes, please.",-,"No, i've changed my mind.",L_C; mes "Ok I'll make the papers ready."; next; if( countitem( .item_req ) < .item_num ) goto L_NEZ; delitem .item_req, .item_num; set $house2_rent,1; set $house2_leader$,strcharinfo(0); set $house2_guild$,strcharinfo(2); set $house2_lpw$,.@gh_lpw$; set $house2_mpw$,.@gh_mpw$; set $house2_buy_day,gettime(5) + 7; // set $house2_buy_month,gettime(6)+.@months; set $FlagID2,.@GID; mes .@n$; mes "Congratulations "+strcharinfo(0)+","; mes "the Guildhouse now belongs to you and your Guild "+strcharinfo(2)+"!"; mes "Your Guildhouse Number is Nr 2."; mes "Have Fun!"; close; L_rent3: mes .@n$; mes "House Nr. 3 is free."; mes "Renting Fee: "+ .item_num +" "+ getitemname( .item_req ) +" for 1 week."; mes "LEADER Password: "+.@gh_lpw$+""; mes "Visitor-Password(for your Guildmembers): "+.@gh_mpw$+""; mes "Would you like to buy the Guildhouse now?"; next; menu "Yes, please.",-,"No, i've changed my mind.",L_C; mes "Ok I'll make the papers ready."; next; if( countitem( .item_req ) < .item_num ) goto L_NEZ; delitem .item_req, .item_num; set $house3_rent,1; set $house3_leader$,strcharinfo(0); set $house3_guild$,strcharinfo(2); set $house3_lpw$,.@gh_lpw$; set $house3_mpw$,.@gh_mpw$; set $house3_buy_day,gettime(5) + 7; // set $house3_buy_month,gettime(6)+.@months; set $FlagID3,.@GID; mes .@n$; mes "Congratulations "+strcharinfo(0)+","; mes "the Guildhouse now belongs to you and your Guild "+strcharinfo(2)+"!"; mes "Your Guildhouse Number is Nr 3."; mes "Have Fun!"; close; L_rent4: mes .@n$; mes "House Nr. 4 is free."; mes "Renting Fee: "+ .item_num +" "+ getitemname( .item_req ) +" for 1 week."; mes "LEADER Password: "+.@gh_lpw$+""; mes "Visitor-Password(for your Guildmembers): "+.@gh_mpw$+""; mes "Would you like to buy the Guildhouse now?"; next; menu "Yes, please.",-,"No, i've changed my mind.",L_C; mes "Ok I'll make the papers ready."; next; if( countitem( .item_req ) < .item_num ) goto L_NEZ; delitem .item_req, .item_num; set $house4_rent,1; set $house4_leader$,strcharinfo(0); set $house4_guild$,strcharinfo(2); set $house4_lpw$,.@gh_lpw$; set $house4_mpw$,.@gh_mpw$; set $house4_buy_day,gettime(5) + 7; // set $house4_buy_month,gettime(6)+.@months; set $FlagID4,.@GID; mes .@n$; mes "Congratulations "+strcharinfo(0)+","; mes "the Guildhouse now belongs to you and your Guild "+strcharinfo(2)+"!"; mes "Your Guildhouse Number is Nr 4."; mes "Have Fun!"; close; L_rent5: mes .@n$; mes "House Nr. 5 is free."; mes "Renting Fee: "+ .item_num +" "+ getitemname( .item_req ) +" for 1 week."; mes "LEADER Password: "+.@gh_lpw$+""; mes "Visitor-Password(for your Guildmembers): "+.@gh_mpw$+""; mes "Would you like to buy the Guildhouse now?"; next; menu "Yes, please.",-,"No, i've changed my mind.",L_C; mes "Ok I'll make the papers ready."; next; if( countitem( .item_req ) < .item_num ) goto L_NEZ; delitem .item_req, .item_num; set $house5_rent,1; set $house5_leader$,strcharinfo(0); set $house5_guild$,strcharinfo(2); set $house5_lpw$,.@gh_lpw$; set $house5_mpw$,.@gh_mpw$; set $house5_buy_day,gettime(5) + 7; // set $house5_buy_month,gettime(6)+.@months; set $FlagID5,.@GID; mes .@n$; mes "Congratulations "+strcharinfo(0)+","; mes "the Guildhouse now belongs to you and your Guild "+strcharinfo(2)+"!"; mes "Your Guildhouse Number is Nr 5."; mes "Have Fun!"; close; L_rent6: mes .@n$; mes "House Nr. 6 is free."; mes "Renting Fee: "+ .item_num +" "+ getitemname( .item_req ) +" for 1 week."; mes "LEADER Password: "+.@gh_lpw$+""; mes "Visitor-Password(for your Guildmembers): "+.@gh_mpw$+""; mes "Would you like to buy the Guildhouse now?"; next; menu "Yes, please.",-,"No, i've changed my mind.",L_C; mes "Ok I'll make the papers ready."; next; if( countitem( .item_req ) < .item_num ) goto L_NEZ; delitem .item_req, .item_num; set $house6_rent,1; set $house6_leader$,strcharinfo(0); set $house6_guild$,strcharinfo(2); set $house6_lpw$,.@gh_lpw$; set $house6_mpw$,.@gh_mpw$; set $house6_buy_day,gettime(5) + 7; // set $house6_buy_month,gettime(6)+.@months; set $FlagID6,.@GID; mes .@n$; mes "Congratulations "+strcharinfo(0)+","; mes "the Guildhouse now belongs to you and your Guild "+strcharinfo(2)+"!"; mes "Your Guildhouse Number is Nr 6."; mes "Have Fun!"; close; L_I: mes .@n$; mes "In my possession are 6 houses + land."; mes "You can rent them (as long as they're free) from me."; mes "The price depends on the time that you rent the house."; mes "Each Month you have to pay me 1'000'000 Zeny."; mes "If the time expires, the house is released and you have to re-rent it from me if you want it again."; close; L_NGM: mes .@n$; mes "Sorry, only the Guildleader can rent Guildhouses from me!"; close; L_GSTL: mes "Sorry, but without the Guildskill 'Guild Approval' you can't rent a Guildhouse!"; close; L_GLTL: mes "Sorry, but i only rent Guildhouses to Guilds which are participating active in WoE!"; mes "And your Guild does not have 5 Member or a Guildlevel of 10."; mes "Come back again if your Guild has grown!"; close; L_M: mes .@n$; mes "You must rent a Guildhouse for 1 week!"; close; L_NP: mes .@n$; mes "Sorry, but because of safety reasons you have to choose a password!"; close; L_NEZ: mes .@n$; mes "I'm sorry but you're not having enough items to rent a Guildhouse."; mes "Come back again when you got enough items!"; close; L_GGH: mes .@n$; mes "Your Guild already posseses a Guildhouse from me!"; close; L_C: mes .@n$; mes "Allright, then come back again when you've changed your mind."; close; OnClock0001: if( $house1_buy_day == gettime(5) ){ set $house1_rent,0; set $house1_leader$,0; set $house1_guild$,0; set $house1_lpw$,"closed"; set $house1_mpw$,"closed"; set $house1_buy_day,0; // set $house1_buy_month,0; set $FlagID1,0; } if( $house2_buy_day == gettime(5) ){ set $house2_rent,0; set $house2_leader$,0; set $house2_guild$,0; set $house2_lpw$,"closed"; set $house2_mpw$,"closed"; set $house2_buy_day,0; // set $house2_buy_month,0; set $FlagID2,0; } if( $house3_buy_day == gettime(5) ){ set $house3_rent,0; set $house3_leader$,0; set $house3_guild$,0; set $house3_lpw$,"closed"; set $house3_mpw$,"closed"; set $house3_buy_day,0; // set $house3_buy_month,0; set $FlagID3,0; } if( $house4_buy_day == gettime(5) ){ set $house4_rent,0; set $house4_leader$,0; set $house4_guild$,0; set $house4_lpw$,"closed"; set $house4_mpw$,"closed"; set $house4_buy_day,0; // set $house4_buy_month,0; set $FlagID4,0; } if( $house5_buy_day == gettime(5) ){ set $house5_rent,0; set $house5_leader$,0; set $house5_guild$,0; set $house5_lpw$,"closed"; set $house5_mpw$,"closed"; set $house5_buy_day,0; // set $house5_buy_month,0; set $FlagID5,0; } if( $house6_buy_day == gettime(5) ){ set $house6_rent,0; set $house6_leader$,0; set $house6_guild$,0; set $house6_lpw$,"closed"; set $house6_mpw$,"closed"; set $house6_buy_day,0; // set $house6_buy_month,0; set $FlagID6,0; } end; OnInit: set .item_req, 20000; set .item_num, 1; end; } maintown,133,372,1 script House Nr. 1 111,{ set .@n$,"[House Nr. 1]"; set .@GID,getcharid(2); if($house1_rent==1)goto L_ST; if(.@GID != $FlagID1) goto L_NGM; mes .@n$; mes "This Guildhouse is empty and free for rent.."; close; L_ST: mes .@n$; mes "This is the Guildhouse from "+$house1_leader$+" from the "+$house1_guild$+" Guild."; mes "What can i do for you?"; next; menu "Enter",-,"Manage",L_E,"Nothing",L_C; mes .@n$; mes "Please insert the Guildhouse Password."; input .@pw$; if(.@pw$ != $house1_mpw$) goto L_WPW; mes "Welcome "+strcharinfo(0)+" please come in."; next; warp "rent_in",20,5; close; L_E: mes .@n$; mes "Please insert the Leader Password."; input .@pw$; if(.@pw$ != $house1_lpw$)goto L_WPW; mes "What can i do for you?"; next; menu "Change Leader Password",-,"Change Member Password",L_CMPW,"Change Guildemblem",L_CGE,"Nothing",L_C; mes .@n$; mes "Please insert now the new Leader Password."; input .@newlpw$; set $house1_lpw$,.@newlpw$; mes "Your new Leader Password is now: "+$house1_lpw$+"."; close; L_CMPW: mes .@n$; mes "Please insert now the new Visitor Password."; input .@newmpw$; set $house1_mpw$,.@newmpw$; mes "Your new Member Password is: "+$house1_mpw$+"."; close; L_CGE: mes .@n$; mes "Would you like to change the current Emblem on the Flag with your current one?"; next; menu "Yes, please.",-,"No, thanks.",L_C; set $FlagID1,getcharid(2); mes "Change was successfull."; close; L_NGM: mes .@n$; mes "Sorry, but you're not belonging to this Guild!"; close; L_WPW: mes .@n$; mes "Incorrect Password!"; close; L_C: mes .@n$; mes "Ok, bye."; close; } maintown,115,372,1 script House Nr. 2 111,{ set .@n$,"[House Nr. 2]"; set .@GID,getcharid(2); if(.@GID != $FlagID2) goto L_NGM; if($house2_rent==1)goto L_ST; mes .@n$; mes "This Guildhouse is empty and free for rent.."; close; L_ST: mes .@n$; mes "This is the Guildhouse from "+$house2_leader$+" from the "+$house2_guild$+" Guild."; mes "What can i do for you?"; next; menu "Enter",-,"Manage",L_E,"Nothing",L_C; mes .@n$; mes "Please insert the Guildhouse Password."; input .@pw$; if(.@pw$ != $house2_mpw$) goto L_WPW; mes "Welcome "+strcharinfo(0)+" please come in."; next; warp "rent_in2",20,5; close; L_E: mes .@n$; mes "Please insert the Leader Password."; input .@pw$; if(.@pw$ != $house2_lpw$)goto L_WPW; mes "What can i do for you?"; next; menu "Change Leader Password",-,"Change Member Password",L_CMPW,"Change Guildemblem",L_CGE,"Nothing",L_C; mes .@n$; mes "Please insert now the new Leader Password."; input .@newlpw$; set $house2_lpw$,.@newlpw$; mes "Your new Leader Password is now: "+$house2_lpw$+"."; close; L_CMPW: mes .@n$; mes "Please insert now the new Visitor Password."; input .@newmpw$; set $house2_mpw$,.@newmpw$; mes "Your new Member Password is: "+$house2_mpw$+"."; close; L_CGE: mes .@n$; mes "Would you like to change the current Emblem on the Flag with your current one?"; next; menu "Yes, please.",-,"No, thanks.",L_C; set $FlagID2,getcharid(2); mes "Change was successfull."; close; L_NGM: mes .@n$; mes "Sorry, but you're not belonging to this Guild!"; close; L_WPW: mes .@n$; mes "Incorrect Password!"; close; L_C: mes .@n$; mes "Ok, bye."; close; } maintown,99,366,1 script House Nr. 3 111,{ set .@n$,"[House Nr. 3]"; set .@GID,getcharid(2); if(.@GID != $FlagID3) goto L_NGM; if($house3_rent==1)goto L_ST; mes .@n$; mes "This Guildhouse is empty and free for rent.."; close; L_ST: mes .@n$; mes "This is the Guildhouse from "+$house3_leader$+" from the "+$house3_guild$+" Guild."; mes "What can i do for you?"; next; menu "Enter",-,"Manage",L_E,"Nothing",L_C; mes .@n$; mes "Please insert the Guildhouse Password."; input .@pw$; if(.@pw$ != $house3_mpw$) goto L_WPW; mes "Welcome "+strcharinfo(0)+" please come in."; next; warp "rent_in3",20,5; close; L_E: mes .@n$; mes "Please insert the Leader Password."; input .@pw$; if(.@pw$ != $house3_lpw$)goto L_WPW; mes "What can i do for you?"; next; menu "Change Leader Password",-,"Change Member Password",L_CMPW,"Change Guildemblem",L_CGE,"Nothing",L_C; mes .@n$; mes "Please insert now the new Leader Password."; input .@newlpw$; set $house3_lpw$,.@newlpw$; mes "Your new Leader Password is now: "+$house3_lpw$+"."; close; L_CMPW: mes .@n$; mes "Please insert now the new Visitor Password."; input .@newmpw$; set $house3_mpw$,.@newmpw$; mes "Your new Member Password is: "+$house3_mpw$+"."; close; L_CGE: mes .@n$; mes "Would you like to change the current Emblem on the Flag with your current one?"; next; menu "Yes, please.",-,"No, thanks.",L_C; set $FlagID3,getcharid(2); mes "Change was successfull."; close; L_NGM: mes .@n$; mes "Sorry, but you're not belonging to this Guild!"; close; L_WPW: mes .@n$; mes "Incorrect Password!"; close; L_C: mes .@n$; mes "Ok, bye."; close; } maintown,85,364,1 script House Nr. 4 111,{ set .@n$,"[House Nr. 4]"; set .@GID,getcharid(2); if(.@GID != $FlagID4) goto L_NGM; if($house4_rent==1)goto L_ST; mes .@n$; mes "This Guildhouse is empty and free for rent.."; close; L_ST: mes .@n$; mes "This is the Guildhouse from "+$house4_leader$+" from the "+$house4_guild$+" Guild."; mes "What can i do for you?"; next; menu "Enter",-,"Manage",L_E,"Nothing",L_C; mes .@n$; mes "Please insert the Guildhouse Password."; input .@pw$; if(.@pw$ != $house4_mpw$) goto L_WPW; mes "Welcome "+strcharinfo(0)+" please come in."; next; warp "rent_in4",20,5; close; L_E: mes .@n$; mes "Please insert the Leader Password."; input .@pw$; if(.@pw$ != $house4_lpw$)goto L_WPW; mes "What can i do for you?"; next; menu "Change Leader Password",-,"Change Member Password",L_CMPW,"Change Guildemblem",L_CGE,"Nothing",L_C; mes .@n$; mes "Please insert now the new Leader Password."; input .@newlpw$; set $house4_lpw$,.@newlpw$; mes "Your new Leader Password is now: "+$house4_lpw$+"."; close; L_CMPW: mes .@n$; mes "Please insert now the new Visitor Password."; input .@newmpw$; set $house4_mpw$,.@newmpw$; mes "Your new Member Password is: "+$house4_mpw$+"."; close; L_CGE: mes .@n$; mes "Would you like to change the current Emblem on the Flag with your current one?"; next; menu "Yes, please.",-,"No, thanks.",L_C; set $FlagID4,getcharid(2); mes "Change was successfull."; close; L_NGM: mes .@n$; mes "Sorry, but you're not belonging to this Guild!"; close; L_WPW: mes .@n$; mes "Incorrect Password!"; close; L_C: mes .@n$; mes "Ok, bye."; close; } maintown,69,366,1 script House Nr. 5 111,{ set .@n$,"[House Nr. 5]"; set .@GID,getcharid(2); if(.@GID != $FlagID5) goto L_NGM; if($house5_rent==1)goto L_ST; mes .@n$; mes "This Guildhouse is empty and free for rent.."; close; L_ST: mes .@n$; mes "This is the Guildhouse from "+$house5_leader$+" from the "+$house5_guild$+" Guild."; mes "What can i do for you?"; next; menu "Enter",-,"Manage",L_E,"Nothing",L_C; mes .@n$; mes "Please insert the Guildhouse Password."; input .@pw$; if(.@pw$ != $house5_mpw$) goto L_WPW; mes "Welcome "+strcharinfo(0)+" please come in."; next; warp "rent_in5",20,5; close; L_E: mes .@n$; mes "Please insert the Leader Password."; input .@pw$; if(.@pw$ != $house5_lpw$)goto L_WPW; mes "What can i do for you?"; next; menu "Change Leader Password",-,"Change Member Password",L_CMPW,"Change Guildemblem",L_CGE,"Nothing",L_C; mes .@n$; mes "Please insert now the new Leader Password."; input .@newlpw$; set $house5_lpw$,.@newlpw$; mes "Your new Leader Password is now: "+$house5_lpw$+"."; close; L_CMPW: mes .@n$; mes "Please insert now the new Visitor Password."; input .@newmpw$; set $house5_mpw$,.@newmpw$; mes "Your new Member Password is: "+$house5_mpw$+"."; close; L_CGE: mes .@n$; mes "Would you like to change the current Emblem on the Flag with your current one?"; next; menu "Yes, please.",-,"No, thanks.",L_C; set $FlagID5,getcharid(2); mes "Change was successfull."; close; L_NGM: mes .@n$; mes "Sorry, but you're not belonging to this Guild!"; close; L_WPW: mes .@n$; mes "Incorrect Password!"; close; L_C: mes .@n$; mes "Ok, bye."; close; } maintown,57,365,1 script House Nr. 6 111,{ set .@n$,"[House Nr. 1]"; set .@GID,getcharid(2); if(.@GID != $FlagID6) goto L_NGM; if($house6_rent==1)goto L_ST; mes .@n$; mes "This Guildhouse is empty and free for rent.."; close; L_ST: mes .@n$; mes "This is the Guildhouse from "+$house6_leader$+" from the "+$house6_guild$+" Guild."; mes "What can i do for you?"; next; menu "Enter",-,"Manage",L_E,"Nothing",L_C; mes .@n$; mes "Please insert the Guildhouse Password."; input .@pw$; if(.@pw$ != $house6_mpw$) goto L_WPW; mes "Welcome "+strcharinfo(0)+" please come in."; next; warp "rent_in6",20,5; close; L_E: mes .@n$; mes "Please insert the Leader Password."; input .@pw$; if(.@pw$ != $house6_lpw$)goto L_WPW; mes "What can i do for you?"; next; menu "Change Leader Password",-,"Change Member Password",L_CMPW,"Change Guildemblem",L_CGE,"Nothing",L_C; mes .@n$; mes "Please insert now the new Leader Password."; input .@newlpw$; set $house6_lpw$,.@newlpw$; mes "Your new Leader Password is now: "+$house6_lpw$+"."; close; L_CMPW: mes .@n$; mes "Please insert now the new Visitor Password."; input .@newmpw$; set $house6_mpw$,.@newmpw$; mes "Your new Member Password is: "+$house6_mpw$+"."; close; L_CGE: mes .@n$; mes "Would you like to change the current Emblem on the Flag with your current one?"; next; menu "Yes, please.",-,"No, thanks.",L_C; set $FlagID6,getcharid(2); mes "Change was successfull."; close; L_NGM: mes .@n$; mes "Sorry, but you're not belonging to this Guild!"; close; L_WPW: mes .@n$; mes "Incorrect Password!"; close; L_C: mes .@n$; mes "Ok, bye."; close; }
-
- script faith -1,{ OnPCLoginEvent: if(gettimetick(2) - #faithd < (60 * 60 * 24)){ end; } .@size = query_sql( "SELECT `login`.`account_id` FROM login LEFT JOIN `char` ON `login`.`account_id`= `char`.`account_id` WHERE `login`.`last_ip` LIKE '"+ escape_sql( getcharip() ) +"' and `char`.`online` = 1", .@acc_id ); if ( .@size > 1 ) end; if(gettime(4) == 6) goto L_7Day; message strcharinfo(0), "You received 5 Loyalty Points"; set #LoyaltyPoints,#LoyaltyPoints+5; set #faithd,gettimetick(2); set #consecutive,#consecutive+1; end; L_7Day: if(gettimetick(2) - #faithd < (60 * 60 * 24)){ end; } if(#consecutive == 7){ set #consecutive,1; set #LoyaltyPoints,#LoyaltyPoints+20; message strcharinfo(0), "Congratulations, You receive 20 Loyalty Points"; set #faithd,gettimetick(2); end; } message strcharinfo(0), "You received 5 Loyalty Points"; set #LoyaltyPoints,#LoyaltyPoints+5; set #faithd,gettimetick(2); set #consecutive,1; end; }
-
//Author-Script PHiLiP prontera,156,180,6 script DeathMatch 733,{ mes "[DeathMatch Warper]"; mes "Do you really wanna go to the Arena?"; switch(select("Yeah:Nope")) { case 1: announce "["+strcharinfo(0)+"] Has Enter DeathMatch Arena",bc_all,"0xFF0066",FW_BOLD,10; warp "pvp_n_1-5",0,0; end; case 2: mes "Ok,see you later."; close; } OnPCKillEvent: if( killedrid == getcharid(3) || strcharinfo(3) != "pvp_n_1-5" ) end; announce strcharinfo(0)+" has killed "+ rid2name( killedrid ), 0; .@killed = killedrid; if( getd( "@timer_pvp"+ .@killed ) < gettimetick(2) ) { setd "@points_pvp"+ .@killed, 0; setd "@timer_pvp"+ .@killed, 0; } if( getd( "@points_pvp"+ .@killed ) > 2 ) { dispbottom "[Battle Points] : You already kill "+ rid2name( .@killed ) +" more than 3 times in the last 5 min."; if( attachrid( .@killed ) ) { sleep2 100; atcommand "@Alive"; warp strcharinfo(3),0,0; } end; } else if( getd( "@points_pvp"+ .@killed ) == 0 ) setd "@timer_pvp"+ .@killed, gettimetick(2) + .delay * 60; setd "@points_pvp"+ .@killed, getd( "@points_pvp"+ .@killed ) + 1; set #dmpoint, #dmpoint + 2; dispbottom "[Battle Points] : +2 Deathmatch Points, Current Points = "+#dmpoint; if( attachrid( .@killed ) ) { sleep2 100; atcommand "@Alive"; warp strcharinfo(3),0,0; set #dmpoint, #dmpoint - 1; dispbottom "[Battle Points] :-1 Deathmatch Points, Current Points = "+#dmpoint; } end; OnInit: .delay = 5; // 5 mins end; } // ----------- Heal Buff Repair ----------- pvp_n_1-5,96,69,5 script Healer 936,{ if(TimeHealed > gettimetick(2)) { mes "[Healer]"; mes "I am sorry, but I am not a robot."; mes "I am still exhausted from the last time I healed you."; close; } sleep2 100; skilleffect 34,0; sc_start SC_BLESSING,300000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,300000,10; percentheal 100,100; emotion e_no1; set TimeHealed, gettimetick(2) + 10; while (getbrokenid(1)) { repair(1); set .@a, .@a +1; } if (.@a) dispbottom .@a + " items repaired."; end; } // --------------- Exit --------------------- pvp_n_1-5,103,69,5 script Exit 902,{ warp "prontera.gat" ,155,176; } // --------------Enter/exit from heaker---------- pvp_n_1-5,99,83,2 script Enter 964,{ warp "pvp_n_1-5" ,99,66; } pvp_n_1-5,99,73,5 script Back To Arena 964,{ warp "pvp_n_1-5" ,0,0; } // --------------- Wall --------------------- pvp_n_1-5,103,60,5 script wall -1,{ OnInit: setcell "pvp_n_1-5",101,62,98,82,cell_walkable,0; end; } //mapflags pvp_n_1-5 mapflag pvp pvp_n_1-5 mapflag nosave pvp_n_1-5 mapflag noteleport pvp_n_1-5 mapflag nowarpto pvp_n_1-5 mapflag nowarp pvp_n_1-5 mapflag nogo pvp_n_1-5 mapflag nobranch
-
Custom shop keeper triggers unknown map error
Capuche replied to sietse11's question in Scripting Support
lutie's map name = xmas not lutie prontera,157,128,3 shop Robbin Hood's arrows 51,1750:-1,1751:-1,1752:-1,1753:-1,1754:-1,1755:-1,1756:-1,1757:-1,1759:-1,1762:-1,1765:-1,1766:-1, Remove the , in the end of the line Example alberta_in,165,96,0 shop Item Collector#alb 74,911:-1,528:-1 -
Yes it will work but be careful about multi-loop : each time a player will warp, a new loop will start No the loop will start only if the conditions while( conditions ) are true Thinks about it more carefully and make some test on local, you can do it while I will dream of some horse and pink flowers in dreamland bouhou
-
No it's not the good way to use my script Something must start the loop and in my example, it was a player who chose the map, then he is warped on the map and he starts the loop which check if there is someone on the map This way, the loop start when a player warp on the map //======================================== // Auto Cleaner ========================== //======================================== - script DBArenaCleaner -1,{ OnPCLoadMapEvent: if( !compare( .map_checker$, strcharinfo(3) ) ) end; // check if a player is on a map in the setting .@m$ = strcharinfo(3); if( getd( "."+ .@m$ +"$" ) ) end; // check if already a loop for the map setd "."+ .@m$ +"$", 1; while( .timer_clean ) { sleep 5000; if( getmapusers( .@m$ ) ) .@count = 0; else { .@count++; if( .@count == .timer_clean * 12 ) goto L_clean; } } L_clean: setd "."+ .@m$ +"$", 0; killmonsterall .map_mvp$[.@s]; end; OnInit: setarray .map_mvp$, "dbarena1","dbarena2","dbarena3","dbarena4","dbarena5"; .map_checker$ = implode( .map_mvp$, "|" ); for( ; .@i < getarraysize( .map_mvp$ ); .@i++ ) setmapflag .map_mvp$[.@i], mf_loadevent; .timer_clean = 5; // Hier stellt man den Timer ein. end; }
-
You will say I harrass you but... gettime(2) == .hourlymin The player must load/warp on the map at the exact minute of the setting otherwise he doesn't get the reward, it's a little weird checkidle() < .idletime*60 If the player load/warp then no need of checkidle coz he won't be idle --' Why not but OnWhisperGlobal were commented in your script A good way would be to do a loop when the player log in and check some condition Another way : a hourly gift to player online (but that's not the request I think)