-
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
-
Yeah xD I tested it too you can buy something being on the sofa
-
Interesting~ I move this topic in script discussion I believe we could drop the 'atcommand level' and change it to 'group id' permission bindatcmd "command","<NPC object name>::<event label>"{,<group id 1>,<group id 2>,...};
-
Yeah it's true Well me I like this count on a loop, interesting idea~
-
A funny bug LoL Add a close2; before the 2 doevent to close the first window before the second appear.
-
Maybe the (old ?) private mvp room by AnnieRuru will fulfit you request ? http://www.eathena.ws/board/Private-Mvp-branch-Room-t187654.html
-
If you want an NPC try this script by tr0n There was a NPC by Emistry that was doing something like that too, don't remember well..
-
someone who can reorganize my script i made please
Capuche replied to secondL's question in Script Requests
atcommand "@alive"; atcommand "@heal"; You can use Recovery command instead of atcommand recovery 0;// revive and/or heal the player attached -
Post a ss of your error(s) display by your mapserver
-
Some reading : Adding_a_Script
-
Try this : - script LMS_npc -1,{ OnClock0045: OnClock0245: OnClock0445: OnClock0645: OnClock0845: OnClock1045: OnClock1245: OnClock1445: OnClock1645: OnClock1845: OnClock2045: OnClock2245: announce "Mr. Manager: The Last Man Standing event will be starting shortly.",0; sleep 10000; announce "Mr. Manager: Those who want to play, please proceed to Prontera and Register.",0; sleep 10000; announce "Mr. Manager: After 1 Minute the Registration will close.",0; sleep 10000; announce "Mr. Manager: Please go to Prontera and Register now if you want to join.",0; enablenpc "All Job Manager"; sleep 30000; announce "Mr. Manager: Last 30 seconds.",0; sleep 5000; announce "Mr. Manager: If you want to join please Register in Prontera.",0; sleep 15000; announce "Mr. Manager: Last 10 seconds.",0; sleep 5000; for( set .@i, 5; .@i > 0; set .@i, .@i -1 ) { announce "Mr. Manager: "+ .@i +".",0; sleep 1000; } announce "Mr. Manager: Time's up.",0; sleep 1000; disablenpc "All Job Manager"; donpcevent "All Job Manager::OnEnable"; end; OnInit: disablenpc "Mr.Banker"; disablenpc "All Job Manager"; disablenpc "Killa_warp"; end; } //---------All Job Registration--------------- prontera,155,181,5 script All Job Manager 106,{ if( Class == Job_Novice ){ mes "Novice cant join."; close; } else if ( getcharid(1) ) { mes "You have a party you cannot enter"; close; } mes "[Mr. Manager]"; mes "Hello What can I do for you?"; next; menu "Register",-,"What is LMS?",what,"Leave",leave; next; mes "[Mr. Manager]"; mes "Thank you for registering Mr. " + strcharinfo(0) + ", Have fun!"; close2; warp "1@pump",0,0; if( .size ) { while( .@i < .size && .name_reg$[.@i] != strcharinfo(0) ) set .@i, .@i +1; if( .@i == .size ) end; } .aid_reg[.size] = getcharid(3); .name_reg$[.size] = strcharinfo(0); .size++; #kill_point = 0; end; what: mes "[Mr. Manager]"; mes "LMS is also known as Last Man Standing Event"; next; mes "[Mr. Manager]"; mes "LMS is also like a PvP."; mes "The only difference is at LMS you will TCG Card if you are the Last Man Standing at the arena."; next; mes "[Mr. Manager]"; mes "That's all"; close; leave: mes "[Mr. Manager]"; mes "I hope you will register next time"; close; OnEnable: pvpoff "1@pump"; mapannounce "1@pump","Mr. Manager: The Last Man Standing Event will start shortly",0; sleep 10000; mapannounce "1@pump","Mr. Manager: But before we start this is just a few reminders..",0; sleep 10000; mapannounce "1@pump","Mr. Manager: Only the Last Man Standing will win this event!!",0; sleep 10000; mapannounce "1@pump","Mr. Manager: What are we waiting for?..Let's Get Ready to Rumble!!...",0; sleep 10000; if(getmapusers("1@pump") == 1) goto L_Champ; else if(getmapusers("1@pump") == 0) end; else if(getmapusers("1@pump") > 1) { mapannounce "1@pump","Mr. Manager: Get ready at the count of 5 we will start!....",0; sleep 1000; for( set .@i, 5; .@i > 0; set .@i, .@i -1 ) { mapannounce "1@pump","Mr. Manager: "+ .@i +" !",0; sleep 1000; } pvpon "1@pump"; enablenpc "Killa_warp"; initnpctimer; } L_loop: sleep 2000; if(getmapusers("1@pump") == 1) { // winner L_Champ: mapannounce "1@pump","Mr.Banker: Please talk to me to get your prize..",0; pvpoff "1@pump"; enablenpc "Mr.Banker"; stopnpctimer; sleep 60000; goto L_disable; } else if(getmapusers("1@pump") == 2) { announce "Mr. Manager: Last 2 Brave warriors are still alive!",0; sleep 10000; if(getmapusers("1@pump") == 1) goto L_Champ; else if(getmapusers("1@pump") > 1) goto L_loop; } else if(getmapusers("1@pump") > 2) goto L_loop; L_disable: mapwarp "1@pump", "prontera",155,182; disablenpc "Mr.Banker"; disablenpc "Killa_warp"; stopnpctimer; deletearray .aid_reg; deletearray .name_reg$; .size = 0; end; OnTimer600000: // out of time announce "Mr. Manager: Out of time ! End of the event !", 0; for ( .@i = 0; .@i < .size; .@i++ ) if( !getmapxy( .@map$, .@x, .@y, 0, .name_reg$[.@i] ) && .@map$ == "1@pump" ) { attachrid .aid_reg[.@i]; if ( .@points <= #kill_point ) { .@points = #kill_point; .@winner = .aid_reg[.@i]; .@winner_name$ = .name_reg$[.@i]; } } detachrid; announce "Mr. Manager: We have a winner! well done "+ .@winner_name$ +".",0; getitem 7227,50, .@winner; getitem 12103,1, .@winner; // Change This item id to what ever you want . item id,amount getitem 7829,10, .@winner; getitem 7828,10, .@winner; sleep 1000; goto L_disable; } 1@pump,52,99,6 script Mr.Banker 56,{ mes "[Banker]"; mes "Congrats. You've won."; close2; announce "Mr. Manager: We have a winner! well done "+strcharinfo(0)+".",0; getitem 7227,50; getitem 12103,1; // Change This item id to what ever you want . item id,amount getitem 7829,10; getitem 7828,10; warp "prontera",155,182; disablenpc "Mr.Banker"; disablenpc "Killa_warp"; end; } //----- Die = warp prt ----- - script Killa_warp -1,{ OnPCDieEvent: if( strcharinfo(3) == "1@pump" ) { set #kill_point, 0; announce ""+strcharinfo(0)+" died, and out of the game!.",bc_all; warp "prontera",150,150; } end; OnPCKillEvent: if( strcharinfo(3) =="1@pump") { set #kill_point,#kill_point+1; if ( #kill_point % 4 == 0) { announce ""+strcharinfo(0)+" have made 4 Consecutive Kills!!He will be granted an item",bc_all; getitem 7829,10; getitem 7828,10; } } end; } // == Mapflags 1@pump mapflag nowarp 1@pump mapflag nowarpto 1@pump mapflag noteleport 1@pump mapflag nosave 1@pump mapflag nomemo 1@pump mapflag nobranch 1@pump mapflag pvp_noparty 1@pump mapflag partylock
-
/* CREATE TABLE IF NOT EXISTS `rebirth_system` ( `account_id` int(11) unsigned NOT NULL default '0', `name` varchar(255) NOT NULL DEFAULT 'NULL', `num_rebirth` int(11) unsigned NOT NULL default '0', `last_ip` varchar(100) NOT NULL default '', PRIMARY KEY (`account_id`) ) ENGINE=MyISAM; */ prontera,153,170,5 script Spec 833,{ function checkItem; // check if player have all item required function colorItemrequired; // color the text. Red : not enough item, green otherwise function deleteItem; // delete all items required function displayItemneed; // display all items need at start function getItemReward; // give the items reward function weightreq; // check if your current weight is highter than weight high novice mes "Items need :"; displayItemneed(); next; switch( select( "^777777~ Rebirth", "~ Informations", "~ Rebirth ranking", "~ Good bye^000000" ) ) { case 1: .@eac = eaclass(); if ( num_rebirth == .reset_max ) { mes "You can only rebirth x"+ .reset_max +"."; emotion e_gasp; close; } else if( NextJobExp || NextBaseExp || !( .@eac&EAJL_2 ) || !Upper ) { mes "You must be rebirth max level/max job level."; close; } weightreq(); checkItem(); deleteItem(); break; case 2: mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth +"^000000."; mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get more items."; close; case 4: mes "Bye."; close; case 3: mes "TOP 30 of rebirth."; mes "Name - Number of rebirth"; .@size = query_sql( "select `name`, `num_rebirth` from `rebirth_system` order by `num_rebirth` desc limit 30", .@name$, .@value ); if( .@size ) { for( .@i = 0; .@i < .@size; .@i++ ) mes "^777777"+ ( .@i +1 ) +"/^000000 "+ .@name$[.@i] +": ^FF0000"+ .@value[.@i] +"^000000"; } else mes "^0000ff* the list is empty *^000000"; close; } num_rebirth += 1; if ( Upper ) { // just in case the user change the setting... lastJob = roclass( .@eac&EAJ_UPPERMASK ); jobchange Job_Novice_High; } else jobchange Job_Novice; resetlvl 1; StatusPoint = StatusPoint + .num_status * num_rebirth; getItemReward(); query_sql "insert into `rebirth_system` values ( "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"', '"+ getcharip() +"' ) on duplicate key update `num_rebirth` = `num_rebirth` +1"; announce "[ Rebirth system ] : "+ strcharinfo(0) +" rebirth for the "+ num_rebirth +" time !", 0; close; function checkItem { if ( num_rebirth < .change_reward ) { for ( ; .@i < .size_item; .@i += 2 ) if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] ) { mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ .item_req[ .@i+1 ] +"]^000000"; close; } } else { for ( ; .@i < .size_item2; .@i += 2 ) if ( countitem( .item_req2[.@i] ) < .item_req2[ .@i+1 ] ) { mes "You don't have enought "+ getitemname( .item_req2[.@i] ) +". ^ff0000["+ countitem( .item_req2[.@i] ) +"/"+ .item_req2[ .@i+1 ] +"]^000000"; close; } } return; } function colorItemrequired { if ( num_rebirth < .change_reward ) { if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] ) return "^ff0000"; return "^00ff00"; } else { if ( countitem( .item_req2[ getarg(0) ] ) < .item_req2[ getarg(0)+1 ] ) return "^ff0000"; return "^00ff00"; } } function deleteItem { if ( num_rebirth < .change_reward ) { for ( ; .@i < .size_item; .@i += 2 ) delitem .item_req[.@i], .item_req[ .@i+1 ]; } else { for ( ; .@i < .size_item2; .@i += 2 ) delitem .item_req2[.@i], .item_req2[ .@i+1 ]; } return; } function displayItemneed { if ( num_rebirth < .change_reward ) { for ( ; .@i < .size_item; .@i += 2 ) mes colorItemrequired( .@i ) +" - x"+ .item_req[ .@i+1 ] +" "+ getitemname( .item_req[.@i] ); } else { for ( ; .@i < .size_item2; .@i += 2 ) mes colorItemrequired( .@i ) +" - x"+ .item_req2[ .@i+1 ] +" "+ getitemname( .item_req2[.@i] ); } return; } function getItemReward { if ( num_rebirth < .change_reward ) { for ( ; .@i < .size_reward; .@i += 2 ) getitem .reward[.@i], .reward[ .@i+1 ]; } else { for ( ; .@i < .size_reward2; .@i += 2 ) getitem .reward2[.@i], .reward2[ .@i+1 ]; } return; } function weightreq { if ( Weight > 20000 ) { mes "You have too much items on you. Your weight will be too high after rebirth."; close; } return; } OnInit: .reset_max = 30; // how much reset max .change_reward = 15; // after 30 rebirth, change reward and item required .num_status = 300; // + X number of status points each rebirth // item required <item ID>, <number> for .change_reward < (15 here) setarray .item_req, 6024, 1; .size_item = getarraysize( .item_req ); // item required <item ID>, <number> for .change_reward > (15) setarray .item_req2, 6024, 2; .size_item2 = getarraysize( .item_req2 ); // rewards <item ID>, <number> for .change_reward < (15 here) setarray .reward, 6000, 5; .size_reward = getarraysize( .reward ); // rewards <item ID>, <number> for .change_reward > (15 here) setarray .reward2, 6000, 10; .size_reward2 = getarraysize( .reward2 ); end; } Only 30 rebirths before 15 rebirths, need 1 item ID 6024 and gain 5 items ID 6000 after 15 rebirths, need 2 item ID 6024 and gain 10 items ID 6000 each rebirth the player gained 300 status points Add a menu ranking Is that what you wanted ?
-
ayothaya,236,63 Hard to find
-
In that case you can use a NPC with a monster sprite. Sample: prontera,155,181,5 script Dummy 1002,{ end; OnInit: getmapxy .@map$, .@x_npc, .@y_npc, 1; while(1) { sleep rand(2000,10000); do { .@x = .@x_npc + rand( -5,5 ); .@y = .@y_npc + rand( -5,5 ); } while( !checkcell( .@map$,.@x,.@y,cell_chkpass ) ); npcwalkto .@x, .@y; .@x_npc = .@x; .@y_npc = .@y; } }
-
@Anakid In your script the player get a gift everyday and A c e S p a d e ask to give a gift every hour. Automatically or the player must click on the NPC to get the gift ?
-
Only GM lvl 99 or higher can set the vip account according to this setting : set $VIPs_AdminGmLevel,99; You must whispered the npc vipsystem8806azwan
-
This stop the script if kill by a monster : OnPCDieEvent: if ( killerrid > 3000000 ) end;
-
1/ Replace the content of the 'onwin' label by this up to the last bracket. onwin: if (@win1==0) { Announce "Team War :"+GetPartyName($@TeamID2)+" won",0; callsub L_prize, $@TeamID1; } else if (@win2==0) { Announce "Team War :"+GetPartyName($@TeamID1)+" won",0; callsub L_prize, $@TeamID2; } warpparty "prontera",156,191,$@TeamID1; warpparty "prontera",156,191,$@TeamID2; goto lend; L_prize: getpartymember getarg(0), 1; getpartymember getarg(0), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) if ( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) ) getitem 671, rand(3,5), $@partymemberaid[.@i]; return; 2/ Remove this NPC : bat_b01,390,9,0 script #prizegiver 111,5,5,{ OnTouch: getitem 671, rand(3,5); warp "prontera",156,196; close; }
-
@Patskie You forgot a ; set .@zeny, 1000000 // 1,000,000 zeny and you need to check the zeny to prevent negative value. prontera,155,184,5 script Healer2 909,{ if (@t2 > gettimetick(2)) end; set .@t, 3; // Set Delay Seconds. set .@zeny, 1000000; // 1,000,000 zeny if (BaseLevel > 99) { if ( Zeny < .@zeny ) { dispbottom "I need "+ .@zeny +" Zeny to buff you !"; end; } set Zeny, Zeny - .@zeny; } skilleffect 28,32000; skilleffect 34,0; skilleffect 29,0; percentheal 100,100; sc_start SC_BLESSING,360000,10; sc_start SC_INCREASEAGI,360000,10; if (.@t) set @t2, gettimetick(2)+.@t; while ( .@t ) { dispbottom "You can use me again in "+ .@t +" second"+ ( ( .@t > 1 ) ? "s" : "" ) +"."; sleep2 1000 ; set .@t, .@t - 1; } end; }
-
Remove else getItemReward(); or comment setarray .reward, 504, 1;
-
How to change LHZ Boss Respawn time to every 5hours when killed
Capuche replied to Renji Abarai's question in Scripting Support
lhz_dun03,0,0,0 script mvp_lhz_dun03 -1,{ OnTimer18000000: // delay1 = 18000000 ms (300 min) stopnpctimer; OnInit: // Select Coordinates to summon a random MVP on switch(rand(1,6)) { case 1: set .@x,140; set .@y,232; break; case 2: set .@x,75; set .@y,138; break; case 3: set .@x,140; set .@y,87; break; case 4: set .@x,205; set .@y,140; break; case 5: set .@x,123; set .@y,137; break; case 6: set .@x,175; set .@y,137; break; } set .@mob,rand(1646,1651); monster "lhz_dun03",.@x,.@y,strmobinfo(1,.@mob),.@mob,1,strnpcinfo(3)+"::OnMyMVPDead"; // Select Coordinates to summon a random 99 on switch(rand(1,6)) { case 1: set .@x2,183; set .@y2,97; break; case 2: set .@x2,97; set .@y2,96; break; case 3: set .@x2,47; set .@y2,139; break; case 4: set .@x2,231; set .@y2,140; break; case 5: set .@x2,139; set .@y2,211; break; case 6: set .@x2,139; set .@y2,259; break; } set .@mob2,rand(1640,1645); monster "lhz_dun03",.@x2,.@y2,strmobinfo(1,.@mob2),.@mob2,1,strnpcinfo(3)+"::OnMy99Dead"; end; OnMyMVPDead: killmonster "lhz_dun03",strnpcinfo(3)+"::OnMy99Dead"; initnpctimer; OnMy99Dead: end; } Use this one -
mapflag noequip by Cydh ?
-
swtch => switch or you can try Emistry's refine function http://pastebin.com/raw.php?i=g8W9yhSs
-
prontera,155,156,5 script sdfsds 87,{ if ( !.open ) end; mes "Would you like to go to the gold room ?"; if ( select( "Yes", "No" ) -1 ) close; close2; warp .event_map$,0,0; showdigit -( getnpctimer(0)/1000 ),1; sleep2( 120000 -getnpctimer(0) ); showdigit 120; end; OnTimer120000: // 120 000 ms = 2 mins stopnpctimer; .open = 0; mapwarp .event_map$, "prontera",150,150; cleanmap .event_map$; delwaitingroom; waitingroom "Gold Room Closed",0; OnLoop: sleep 120000; delwaitingroom; waitingroom "Gold Room Opened",0; for ( .@i = 0; .@i < .amount_gold; .@i++ ) { do { .@x = rand( 50,200 ); .@y = rand( 50,200 ); } while( !checkcell( .event_map$,.@x,.@y,cell_chkpass ) ); makeitem 969, 1, .event_map$, .@x, .@y; } initnpctimer; .open = 1; end; OnInit: .amount_gold = 150; .event_map$ = "geffen"; donpcevent strnpcinfo(3) +"::OnLoop"; setarray .@mapflag, mf_nowarp, mf_nowarpto, mf_noteleport; for( ; .@i < getarraysize( .@mapflag ); .@i++ ) setmapflag .event_map$, .@mapflag[.@i]; waitingroom "Gold Room Closed",0; end; } I supposed you mean there are 2 mins of delay before re-opening
-
Hourly item rewards that need to click the npc to get it
Capuche replied to MelMel's question in Script Requests
// ~~~~~ show time left in days, hours, minutes and seconds ~~~~~ function script timeleft__ { if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0); .@day = .@left / 86400; .@hour = .@left % 86400 / 3600; .@min = .@left % 3600 / 60; .@sec = .@left % 60; if ( .@day ) return .@day +" day "+ .@hour +" hour"; else if ( .@hour ) return .@hour +" hour "+ .@min +" min"; else if ( .@min ) return .@min +" min "+ .@sec +" sec"; else return .@sec +" sec"; } prontera,150,165,5 script Hourly reward 87,{ if ( #hourly_timer > gettimetick(2) ) { mes "You must wait "+ callfunc( "timeleft__", #hourly_timer - gettimetick(2) ) +"."; close; } mes "Here your hourly Item : x"+ .item_amount +" ^ff0000"+ getitemname( .item_ID ); getitem .item_ID, .item_amount; #hourly_timer = gettimetick(2) + 3600; close; OnInit: .item_ID = 501; .item_amount = 1; end; }