-
Content Count
365 -
Joined
-
Last visited
-
Days Won
4
Posts posted by Litro
-
-
it would be better if there a setting let the user chose if the announcement in the array will be send randomly or in sequence
PS:
- Why not use OnMinute00, attaching timer to the user will take more ram since server keep the timer peruser CMIIW
-
welcome maam, glad to have you back here, hope you all the best to sort out your problem
-
currently still downloading latest kro client = 33% completed
estimated download finish in 4 hours
so wait until I am able to setup my test server
that .@less_one variable only trigger during OnPCLogoutEvent, and it never meant to trigger for OnPCDieEvent
because .... well that script was made for rathena
Euphy asked me to contribute some custom scripts for their script/custom folder so this was one of them
https://github.com/rathena/rathena/commit/163a98cbc4014344781ec74e1e46c2e384155558
if my memory still serve me right,
rathena OnPCLogoutEvent, although the player is in the process of logging out, but the system still count that player as online,
so I need a temporary variable to make it count 1 less
and for the part the script always check the hp ... of course if everyone died in the map, it should auto end the event in 10 seconds
there are 2 things that comes to my mind
1. hercules going to take out *awake command
https://github.com/HerculesWS/Hercules/pull/374
so I think *awake command doesn't work in hercules anymore
2. hercules way of handling OnPCLogoutEvent are different from rathena
no matter what, I don't think that script having bug if use with rathena
because if it is bug, Euphy would have fix it
but on hercules, I not sure, I need a test server ... maybe tomorrow I can start writing scripts again
there... i gain the knowledge i didn't even aware of that change betwen emulator but again thanks for the knowledge maam :wub:
btw i have rewrite this script using instance for herc emulator, can you test it @@mrlongshen
prontera,150,150,1 script MvP Ladder Game 112,{ mes .@npc_name$ = "["+strnpcinfo(1)+"]"; mes callfunc("F_Hi")+" "+strcharinfo(0); mes "Care for a game ?"; next; switch(select("Yes, let's get it on!:Information.:Show me the best record.:No.")) { case 1: break; case 2: mes .@npc_name$; mes "In this game, your party has to kill every single MvP monster in ascending order, from the weakest to strongest."; next; if (getarraysize(.round_reward)) { mes .@npc_name$; mes "Each round MvPs you defeated yo will earn: "; for (.@i = 0; .@i < getarraysize(.round_reward); .@i+=2) mes .round_reward[.@i+1]+"x "+getitemname(.round_reward[.@i])+"."; next; } if (getarraysize(.round_finish)) { mes .@npc_name$; mes "If your party can finish the MVP ladder game, each member will earn: "; for (.@i = 0; .@i < getarraysize(.round_finish); .@i+=2) mes .round_finish[.@i+1]+"x "+getitemname(.round_finish[.@i])+"."; next; } if (getarraysize(.time_bonus)) { mes .@npc_name$; mes "if your party can beat the best record, each member will earn: "; for (.@i = 0; .@i < getarraysize(.time_bonus); .@i++) mes .time_bonus[.@i+1]+"x "+getitemname(.time_bonus[.@i])+"."; next; } if ( .register_cost ) { mes .@npc_name$; mes "But the entrance fee is "+.register_cost+" zeny."; next; } mes "[MvP Ladder Warper]"; mes "You lose the game if you can't finish in "+(.timeout / 60)+" minutes, or if your entire party is killed."; mes "Good luck!"; close; case 3: mes "[MvP Ladder Warper]"; if ( !$mvpladdderparty_time ) { mes "Nobody has finished this game yet."; close; } mes "The best record is"; mes "[ "+( $mvpladdderparty_time / 60 )+" min "+( $mvpladdderparty_time % 60 )+" sec ]"; .@size = getarraysize( $mvpladderparty_member$ ); for ( .@i = 0; .@i < .@size; .@i++ ) mes "^000000"+ ( .@i +1 ) +". ^0000FF"+ $mvpladderparty_member$[.@i]; if ( getgmlevel() < .gmlvlreset ) close; next; if ( select( "Close.", "Reset the record." ) == 1 ) close; if ( select( "Never mind.", "I really want to reset it." ) == 1 ) close; $mvpladdderparty_time = 0; $mvpladdderparty_name$ = ""; deletearray $mvpladderparty_member$[.@i]; mes "[MvP Ladder Warper]"; mes "Record reset successfully."; close; case 4: mes "[MvP Ladder Warper]"; mes "When you are strong enough to complete the game, please come back."; close; } if (!getcharid(1)) { mes .@npc_name$; mes "You must have a party to play the game"; close; } if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) { mes "[MvP Ladder Warper]"; mes "Only the party leader can register."; close; } .@origin = getcharid(3); getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) .@online++; } } attachrid .@origin; if ( $@partymembercount != .register_min ) { mes "[MvP Ladder Warper]"; mes "You have to form a party with exactly "+ .register_min +" members to play."; close; } else if ( .@online != .register_min ) { mes "[MvP Ladder Warper]"; mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(4) +"'."; close; } if ((.@ins = instance_create("MvPLadderRoom", getcharid(1))) < 0) { mes .@npc_name$; mes "error : "+ .@ins; logmes "MvP Ladder Game: "+strcharinfo(0)+" failed to create an instance, Error Log: "+.@ins; close; } if ( instance_attachmap( "guild_vs2-2", .@ins, 1, "MvPLadderGame") == "" ) { mes "error : 5"; logmes "MvP Ladder Game: "+strcharinfo(0)+" failed to attach an instance map, Error Log: "+.@ins; instance_destroy .@ins; close; } instance_set_timeout .timeout, 300, .@ins; instance_init .@ins; instance_attach .@ins; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) 'name$[.@c] = strcharinfo(0); .@c++; warp has_instance("guild_vs2-2"), 0, 0; } } 'start_time = gettimetick(2); 'lives = .register_min; end; OnInit: // Time limit (in seconds) // When time runs out, all players inside the room will be kicked out. // Do NOT set this to zero! .timeout = 3600; // entrance fee (in Zeny) .register_cost = 100000; // exact amount of party members needed to start the game .register_min = 2; // id of each mvp. you can add more setarray .mvpid[1], 1086,// Golden Thief Bug 64 1115,// Eddga 65 1150,// Moonlight Flower 67 1159,// Phreeoni 69 1112,// Drake 70 1583,// Tao Gunka 70 1492,// Incantation Samurai 71 1046,// Doppelgangger 72 1252,// Garm 73 1418,// Evil Snake Lord 73 1059,// Mistress 74 1190,// Orc Lord 74 1087,// Orc Hero 77 1251,// Knight of Windstorm 77 1038,// Osiris 78 1658,// Ygnizem 79 1272,// Dark Lord 80 1871,// Fallen Bishop 80 1039,// Baphomet 81 1147,// Maya 81 1785,// Atroce 82 1389,// Dracula 85 1630,// Bacsojin 85 1885,// Gorynych 85 1623,// RSX 0806 86 1511,// Amon Ra 88 1688,// Lady Tanee 89 1768,// Gloom Under Night 89 1719,// Datale 90 1734,// Kiel D-01 90 1157,// Pharaoh 93 1373,// Lord of Death 94 1312,// Turtle General 97 1779,// Ktullanux 98 1874,// Beelzebub 98 1646,// Bio3 placeholder 99 1708,// Thanatos 99 1751,// Valkyrie Randgris 99 1832;// Ifrit 99 // number of rounds (default: 39) .totalround = getarraysize(.mvpid) -1; // item reward for completing each round setarray .round_reward, 501, 10; // item reward for completing the entire ladder setarray .round_finish, 501, 10; // bonus reward if ladder completed within a certain time (in minutes) setarray .time_bonus, 504, 10; // time delay between rounds, in seconds (default: 3) .delay = 5; // minimum GM level to reset the best record .gmlvlreset = 99; // event map set .eventmap$, "guild_vs2-2"; // npc coordinat do not touch! getmapxy(.map$, .x, .y, 1); end; OnPCLogoutEvent:OnPCDieEvent: if ( strcharinfo(3) == has_instance("guild_vs2-2") ) { instance_attach has_instance2( "guild_vs2-2" ); 'lives--; if ( !'lives ) { instance_announce -1, "Your party has used up all the lives", bc_map; .@map$ = strcharinfo(3); sleep 5000; mapwarp .@map$, .map$, .x, .y; killmonsterall .@map$; } else { instance_announce -1, "Your party still has "+ 'lives +" lives left", bc_map; } } end;}guild_vs2-2,0,0,0 script MvPLadderGameEngine -1,{OnInstanceInit: sleep 2000; // delay abitOnMvPKilled: .@main$ = "MvP Ladder Game"; // main npc name 'round++; if ( 'round >= 2 && 'round != getvariableofnpc(.totalround, .@main$) +1 && getarraysize(getvariableofnpc(.round_reward, .@main$)) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == getvariableofnpc(.eventmap$, .@main$) ) { for (.@j = 0; .@j < getarraysize(getvariableofnpc(.round_reward, .@main$)); .@j+=2) { getitem getelementofarray(getvariableofnpc(.round_reward, .@main$), .@j), getelementofarray(getvariableofnpc(.round_reward, .@main$), .@j+1); } } } } } if ('round == getvariableofnpc( .totalround, .@main$ ) +1) { .@used_time = gettimetick(2) - 'start_time; if ( !$mvpladdderparty_time || .@timeused < $mvpladdderparty_time ) { instance_announce -1, "Congratulations... You were able to defeat all the MVPs! And you broke the record! [ "+( .@used_time / 60 )+" min "+( .@used_time % 60 )+" sec ]", bc_all; $mvpladdderparty_time = .@used_time; copyarray $mvpladderparty_member$, 'name$, getvariableofnpc(.register_min, .@main$); getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if (strcharinfo(3) == getvariableofnpc(.eventmap$, .@main$)) { for (.@j = 0; .@j < getarraysize(getvariableofnpc(.time_bonus, .@main$)); .@j+=2) { getitem getelementofarray(getvariableofnpc(.time_bonus, .@main$), .@j), getelementofarray(getvariableofnpc(.time_bonus, .@main$), .@j+1); } } } } } else instance_announce -1, "Congratulations... You were able to defeat all the MVPs! Time used [ "+( .@used_time / 60 )+" min "+( .@used_time % 60 )+" sec ]", bc_all; if (getarraysize(getvariableofnpc(.round_finish, .@main$))) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if (strcharinfo(3) == getvariableofnpc(.eventmap$, .@main$)) { for (.@j = 0; .@j < getarraysize(getvariableofnpc(.round_finish, .@main$)); .@j+=2) { getitem getelementofarray(getvariableofnpc(.round_finish, .@main$), .@j), getelementofarray(getvariableofnpc(.round_finish, .@main$), .@j+1); } } } } } sleep 2000; instance_warpall getvariableofnpc( .map$, .@main$ ), getvariableofnpc( .x, .@main$ ), getvariableofnpc( .y, .@main$ ); end; } instance_announce -1, "Prepare for Level "+ 'round +" Mobs...", bc_all; sleep getvariableofnpc( .delay, .@main$ ) * 1000; .@mpv_id = getelementofarray(getvariableofnpc(.mvpid, .@main$), 'round); if ( .@mpv_id == 1646 ) // pick random Bio3 MVP .@mpv_id = rand(1646,1651); monster has_instance(.eventmap$), 0, 0, "--ja--", .@mpv_id, 1, strnpcinfo(0)+"::OnMvPKilled"; instance_announce -1, getmonsterinfo( .@mpv_id, MOB_NAME ) +" has spawned!", bc_map|bc_blue; end;}
OOT:
- maam @@AnnieRuru hope you want to rewrite the Toasty's WoE Controller or Euphy's WOE Controller or Even better merge that two to one, i have been trying to get understand how the script work but still can't get my head around it,
- Cons of each other Controller:
- Euphy's WOE Controller: Can't set the woe time to minute long (ex: you want to start woe at 8.25 PM and end it at 9.20 PM), Didn't have the waiting room of timer box to see when the next woe will be run
- Toasty's WoE Controller: Didn't have the automatic reward giver, can't set the schedule in game generating set of schedule one must go to the link provided but now the link is dead
-
it seem chance how the live count oh party is the only why i can think of because in the current script live counter is re-counted every member dying or log out.
basicaly if a member die or logged out, live count -1, so i try to set the live counter when the the party will be warped to event map and simply check when some on log out or die in the event map is belong to the party that has started the game, if yes set live count -1.
note: i have not tested this script, the only thing I didn't understand in this script is why always check HP the player triggered script and re-count the player alive on the event map.
//===== rAthena Script =======================================//= MVP Ladder Game//===== By: ==================================================//= aftermath, AnnieRuru (rewrite)//===== Current Version: =====================================//= 1.0//===== Compatible With: =====================================//= rAthena Project//===== Description: =========================================//= Gather a party and kill every MVP in ascending order.//===== Additional Comments: =================================//= 1.0 First version, edited. [Euphy]//============================================================prontera,164,171,3 script MvP Ladder Warper 1_M_KNIGHTMASTER,{ // if ((agitcheck() == 1) || (agitcheck2() == 1)){ // mes .npc$; // mes "I'm sorry, during ^0000FFWar of Emperium^000000, You are not Allowed to use my services."; // close; // } mes "[MvP Ladder Warper]"; mes "Say... do you want to play the MvP Ladder game?"; next; switch(select("Yes, let's get it on!:Information.:Show me the best record.:No.")) { case 1: break; case 2: mes "[MvP Ladder Warper]"; mes "In this game, your party has to kill every single MvP monster in ascending order, from the weakest to strongest."; if ( .finish_item_amount ) mes "If your party can finish the MVP ladder game, each member will earn "+ callfunc("F_InsertPlural", .finish_item_amount, getitemname( .finish_item_id )) +"."; if ( .register_cost ) mes "But the entrance fee is "+ callfunc( "F_InsertComma", .register_cost ) +" zeny."; next; mes "[MvP Ladder Warper]"; mes "You lose the game if you can't finish in "+ .timeout +" minutes, or if your entire party is killed."; mes "Good luck!"; close; case 3: mes "[MvP Ladder Warper]"; if ( !$mvpladdderparty_time ) { mes "Nobody has finished this game yet."; close; } mes "The best record is"; mes "[ "+( $mvpladdderparty_time / 60 )+" min "+( $mvpladdderparty_time % 60 )+" sec ]"; mes "By the party ^FF0000"+ $mvpladdderparty_name$ +"^000000."; .@size = getarraysize( $mvpladderparty_member$ ); for ( .@i = 0; .@i < .@size; .@i++ ) mes "^000000"+ ( .@i +1 ) +". ^0000FF"+ $mvpladderparty_member$[.@i]; if ( getgmlevel() < .gmlvlreset ) close; next; if ( select( "Close.", "Reset the record." ) == 1 ) close; if ( select( "Never mind.", "I really want to reset it." ) == 1 ) close; $mvpladdderparty_time = 0; $mvpladdderparty_name$ = ""; deletearray $mvpladderparty_member$[.@i]; mes "[MvP Ladder Warper]"; mes "Record reset successfully."; close; case 4: mes "[MvP Ladder Warper]"; mes "When you are strong enough to complete the game, please come back."; close; } if ( !getcharid(1) ) { mes "[MvP Ladder Warper]"; mes "You have to form a party to play."; close; } if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) { mes "[MvP Ladder Warper]"; mes "Only the party leader can register."; close; } .@origin = getcharid(3); getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) .@online++; } } attachrid .@origin; if ( $@partymembercount != .register_min ) { mes "[MvP Ladder Warper]"; mes "You have to form a party with exactly "+ .register_min +" members to play."; close; } else if ( .@online != .register_min ) { mes "[MvP Ladder Warper]"; mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(4) +"'."; close; } else if ( .register_cost && Zeny < .register_cost ) { mes "[MvP Ladder Warper]"; mes "You don't have enough zeny. Please come back when you do."; close; } else if ( .party_id ) { mes "[MvP Ladder Warper]"; mes "I'm sorry, but a party is currently playing the game. Please standby until the party is finished."; mes "Thank you."; close; } Zeny -= .register_cost; announce "The party ["+ strcharinfo(1) +"] has started the MvP ladder game.", bc_all; set .party_id, getcharid(1); set .@time_enter, gettimetick(2); for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) { announce "You have "+ .timeout +" minutes to complete "+ .totalround +" rounds.", bc_self; .@name$[.@c] = strcharinfo(0); .@c++; } .@alive++; } } cleanmap .eventmap$; warpparty .eventmap$, 0,0, .party_id, strnpcinfo(4); donpcevent strnpcinfo(0)+"::OnMvpDead"; sleep .timeout * 60000; if ( .round == .totalround +1 ) { getpartymember .party_id, 1; getpartymember .party_id, 2; mapannounce .eventmap$, "Congratulations... You were able to defeat all the MVPs!", bc_map; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) getitem .finish_item_id, .finish_item_amount; } } set .@timeused, gettimetick(2) - .@time_enter; if ( .bonus_item_amount && .@timeused < .bonus_time * 60 ) { mapannounce .eventmap$, "You are rewarded a bonus item for completing the ladder within "+ .bonus_time +" minutes.", bc_map; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) getitem .bonus_item_id, .bonus_item_amount; } } } if ( !$mvpladdderparty_time || .@timeused < $mvpladdderparty_time ) { mapannounce .eventmap$, "And you broke the record! [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map; set $mvpladdderparty_time, .@timeused; set $mvpladdderparty_name$, getpartyname( .party_id ); copyarray $mvpladderparty_member$, .@name$, .register_min; } else mapannounce .eventmap$, "Time used [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map; sleep 10000; announce "The party ["+ getpartyname( .party_id ) +"] has finished the MvP ladder game!", bc_all; } else announce "The party ["+ getpartyname( .party_id ) +"] has failed to finish the MvP ladder game.", bc_all; mapwarp .eventmap$, .map$, .x, .y; killmonsterall .eventmap$; .party_id = .round = 0; end;OnMvpDead: .round++; if ( .round >= 2 && .round != .totalround +1 && .round_item_amount ) { for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) getitem .round_item_id, .round_item_amount; } } } if ( .round == .totalround +1 ) { awake strnpcinfo(0); end; } else if ( .round == .totalround ) mapannounce .eventmap$, "The final Round will begin in "+ .delay +" seconds... Party have: "+.@alive+" live left.", bc_map; else mapannounce .eventmap$, "Starting round "+ .round +" in "+ .delay +" seconds... Party have: "+.@alive+" live left.", bc_map; sleep .delay * 1000; if ( .mvpid[.round] == 1646 ) // pick random Bio3 MVP .mvpid[.round] = rand(1646,1651); monster .eventmap$,0,0, "--ja--", .mvpid[.round], 1, strnpcinfo(0)+"::OnMvpDead"; mapannounce .eventmap$, getmonsterinfo( .mvpid[.round], MOB_NAME ) +" has spawned!", bc_map|bc_blue; end;OnPCLogoutEvent:OnPCDieEvent: if ( strcharinfo(3) != .eventmap$ || !getcharid(1) ) end; if ( getcharid(1) != .party_id ) end; getpartymember .party_id, 1; getpartymember .party_id, 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if (getcharid(0) == $@partymembercid[.@i]) .@alive--; } if ( !.@alive ) { mapannounce .eventmap$, "Party wiped!", bc_map; sleep 10000; awake strnpcinfo(0); } end;OnInit:// Configurations ----------------------------------------------------- // Time limit (in minutes) // When time runs out, all players inside the room will be kicked out. // Do NOT set this to zero! set .timeout, 40; // entrance fee (in Zeny) set .register_cost, 10000000; // exact amount of party members needed to start the game set .register_min, 1; // id of each mvp. you can add more setarray .mvpid[1], 1086,// Golden Thief Bug 64 1115,// Eddga 65 1150,// Moonlight Flower 67 1159,// Phreeoni 69 1112,// Drake 70 1583,// Tao Gunka 70 1492,// Incantation Samurai 71 1046,// Doppelgangger 72 1252,// Garm 73 1418,// Evil Snake Lord 73 1059,// Mistress 74 1190,// Orc Lord 74 1087,// Orc Hero 77 1251,// Knight of Windstorm 77 1038,// Osiris 78 1658,// Ygnizem 79 1272,// Dark Lord 80 1871,// Fallen Bishop 80 1039,// Baphomet 81 1147,// Maya 81 1785,// Atroce 82 1389,// Dracula 85 1630,// Bacsojin 85 1885,// Gorynych 85 1623,// RSX 0806 86 1511,// Amon Ra 88 1688,// Lady Tanee 89 1768,// Gloom Under Night 89 1719,// Datale 90 1734,// Kiel D-01 90 1157,// Pharaoh 93 1373,// Lord of Death 94 1312,// Turtle General 97 1779,// Ktullanux 98 1874,// Beelzebub 98 1646,// Bio3 placeholder 99 1708,// Thanatos 99 1751,// Valkyrie Randgris 99 1832;// Ifrit 99 // number of rounds (default: 39) set .totalround, getarraysize(.mvpid) -1; // item reward for completing each round set .round_item_id, 30002; set .round_item_amount, 1; // item reward for completing the entire ladder set .finish_item_id, 30001; set .finish_item_amount, 5; // bonus reward if ladder completed within a certain time (in minutes) set .bonus_time, 30; // if completed within 45 minutes, this reward is given set .bonus_item_id, 30002; set .bonus_item_amount, 30; // time delay between rounds, in seconds (default: 3) set .delay, 10; // minimum GM level to reset the best record set .gmlvlreset, 99; // event map set .eventmap$, "guild_vs2-2"; // mapflag configuration setarray .@mapflag, mf_nowarp, mf_nowarpto, mf_nosave, mf_nomemo, mf_noteleport, mf_nopenalty, // disable exp loss mf_noreturn,// mf_nobranch,// mf_nomobloot, // disable monster drop loots,// mf_nomvploot, // 2 of these mf_partylock;// Config Ends -------------------------------------------------------------- mapannounce .eventmap$, "An administrator has refreshed the server. Please re-register. We apologize for the inconvenience.", bc_map; getmapxy .map$, .x, .y, 1; mapwarp .eventmap$, .map$, .x, .y; killmonsterall .eventmap$; .@size = getarraysize( .@mapflag ); for ( .@i = 0; .@i < .@size; .@i++ ) setmapflag .eventmap$, .@mapflag[.@i]; waitingroom " Ladder Game",0; end;}function script F_GetPlural { set .@str$, getarg(0); if (countstr(.@str$," ")) { // multiple words explode(.@tmp$,.@str$," "); set .@size, getarraysize(.@tmp$); // if format is "... of|in|on ...", pluralize preceding word; else pluralize last word if (compare(.@str$," of ") || compare(.@str$," in ") || compare(.@str$," on ")) { for (set .@i,1; .@i<.@size; set .@i,.@i+1) { if (getstrlen(.@tmp$[.@i]) == 2 && compare("of|in|on",.@tmp$[.@i])) break; set .@index, .@index + 1; } } else set .@index, .@size - 1; set .@str$, .@tmp$[.@index]; set .@tmp$[.@index],"%s"; set .@format$, implode(.@tmp$," "); } else set .@format$, "%s"; set .@strlen, getstrlen(.@str$); if (.@strlen < 3) // prevent errors return ((getarg(1,0)) ? strtoupper(sprintf(.@format$,.@str$)) : sprintf(.@format$,.@str$)); setarray .@suffix$[0], charat(.@str$,.@strlen - 1), substr(.@str$,.@strlen - 2,.@strlen - 1); if (!compare("abcdefghijklmnopqrstuvwxyz",.@suffix$[0])) { // last character is not a letter set .@result$, .@str$; } // common exceptions --> singular form == plural form else if (compare("fish|glasses|sunglasses|clothes|boots|shoes|greaves|sandals|wings|ears",.@str$)) { set .@result$, .@str$; } // ends in -s, -x, -z, -ch, -sh --> add -es else if (.@suffix$[0] == "s" || .@suffix$[0] == "x" || .@suffix$[0] == "z" || .@suffix$[1] == "ch" || .@suffix$[1] == "sh") { set .@result$, .@str$ + "es"; } // ends in -f, -fe --> remove -f, -fe --> add -ves else if ((.@suffix$[0] == "f" || .@suffix$[1] == "fe") && .@suffix$[1] != "ff") { if (compare("belief|cliff|chief|dwarf|grief|gulf|proof|roof",.@str$)) set .@result$, .@str$ + "s"; // exceptions --> add -s else set .@result$, substr(.@str$,0,.@strlen - 2 - (.@suffix$[1] == "fe")) + "ves"; } // ends in consonant + -y --> remove -y --> add -ies else if (.@suffix$[0] == "y" && !compare("aeiou",charat(.@suffix$[1],0))) { set .@result$, delchar(.@str$,.@strlen - 1) + "ies"; } // ends in -o --> exceptions --> add -es else if (.@suffix$[0] == "o" && compare("buffalo|domino|echo|grotto|halo|hero|mango|mosquito|potato|tomato|tornado|torpedo|veto|volcano",.@str$)) { set .@result$, .@str$ + "es"; } // default --> add -s else { set .@result$, .@str$ + "s"; } return ((getarg(1,0)) ? strtoupper(sprintf(.@format$,.@result$)) : sprintf(.@format$,.@result$));}function script F_InsertPlural { return sprintf(getarg(3,"%d %s"), getarg(0), ((getarg(0) == 1) ? getarg(1) : callfunc("F_GetPlural",getarg(1),getarg(2,0))));}function script F_InsertComma { set .@str$, getarg(0); for (set .@i,getstrlen(.@str$)-3; .@i>0; set .@i,.@i-3) set .@str$, insertchar(.@str$,",",.@i); return .@str$;}
-
a sight for sore eyes , in the contrary it will need have more step in creating db for custom monster , anyway its better than before, thx a loot
-
got it loaded in 2014-02-05bRagexe client, i got the missing files browsing it on the web, the maps when nuts at first see black area and after reading on some post regarding brow edit, i re-saving the map on browedit rev586,
-
got this one when loading the map
-
glad it help
-
Thanks it working. But I have to make the item success become 100%
If the player not get the item, the mining will stop. I have test, and the miner wont stop until the item brought finish hahaha !! I need to relog. keh keh keh
By the way, can you help me in making a simple script for example
Player A wear the flu mask, then the item will reduce the progress bar time?
now mining will only stop when the miner exhausted his mining tools supply, when the miner get nothing the mining process will not be stopped any more and you can set success rate again
i have integrate the progress bar reduce time in the script below, look at the comment and make sure you put it right
/*=========================================================Variant Miningby Glitch [Via]===========================================================Request: http://herc.ws/board/topic/1886-simple-mining/===========================================================Description:A simple mining system; allows for interacting players toexcavate minerals by "mining" them with special equipmentand tools.Configuration is done in arrays so that settings may bechanged with no modifications to the script. Keep in mindthat each array value is respective to their commented set.Duplicate in additional locations as needed.=========================================================*/pay_dun00,54,147,0 script Variant Mineral#1::mining 1907,{ disable_items; .@progress = .progress; // Check equipment for (.@i = 0; .@i < getarraysize(.equip); .@i++) { if (!isequipped(.equip[.@i])) { message strcharinfo(0), "You need to have '"+ getitemname(.equip[.@i]) +"' equipped to mine!"; .@unequipped++; } else .@progress -= .e_cast[.@i]; } // Show count of equipment not worn if (.@unequipped) { message strcharinfo(0), .@unequipped +" of "+ getarraysize(.equip) +" equipment has not been worn."; end; } while(1) { // Check tools for (.@i = 0; .@i < getarraysize(.tool); .@i++) { if (countitem(.tool[.@i]) < .inventory[.@i]) { message strcharinfo(0), "You need to bring "+ .inventory[.@i] +" "+ getitemname(.tool[.@i]) +" to mine!"; .@gearless++; } } // Show count of tools not in inventory if (.@gearless) { .@grammar$ = ((getarraysize(.tool) > 1) ? "tools were" : "tool was"); message strcharinfo(0), .@gearless +" of "+ getarraysize(.tool) +" "+ .@grammar$ +" not brought."; end; } // Progress message strcharinfo(0), "Mining in progress..."; progressbar "green", .@progress; // Delete tools for (.@i = 0; .@i < getarraysize(.tool); .@i++) delitem .tool[.@i], .inventory[.@i]; // Audio/visual effects soundeffect .sound$, 0; specialeffect .effect; // Drop random debris getmapxy(.@m$, .@x, .@y, 0); makeitem .debris, .scatter, .@m$, .@x + rand(2), .@y + rand(1,2); // Randomize target mineral to mine .@target = rand(getarraysize(.mineral)); // Max range of success .@range = .success[.@target * 2 + 1]; // Check if failed if(rand(1, .@range) != .success[.@target * 2]) { message strcharinfo(0), "Nothing valuable was excavated..."; // Get mineral(s) } else { getitem .mineral[.@target], .amount[.@target]; message strcharinfo(0), "You have successfully mined "+ .amount[.@target] +" "+ getitemname(.mineral[.@target]) +"!"; } } end; OnWhisperGlobal: // Whisper anything to initialize settings message strcharinfo(0), strnpcinfo(1) +" : 'OnInit' label has been intialized."; OnInit: // Minerals setarray .mineral[0], 985, 984, 6224, 6223; // Jejelopy, Elunium, Oridecon, Bradium, Cranium setarray .amount[0], 1, 1, 1, 1; // Amount to mine // Success rate: (x / y)% chance setarray .success[0], 1, 2, // 50% for Elunium 1, 2, // 50% for Oridecon 1, 4, // 25% Bradium 1, 4; // 25% Cranium //Example of calculation //1, 5, // 1/5 (20%) //1, 2, // 1/2 (50%) //4, 5, // 4/5 (80%) //1, 50; // 1/50 (2%) // Mining time (in seconds) - .progress need to be greater than from total .e_cast!! .progress = 3; // Equipment setarray .equip[0], 5009, 2218; // Safety Helmet, Flu Mask setarray .e_cast[0], 1, 1; // Progress bar reduce time. - .e_cast need to be smaller from total .progress!! // Tools setarray .tool[0], 7318, 7327; // Old Pick, Flashlight setarray .inventory[0], 1, 1; // Amount per tool // Audio/visual effects .sound$ = "chepet_attack.wav"; .effect = 4; // Debris .debris = 7049; // Stone .scatter = 5; // Debris amount end; }// Duplicatespay_dun00,55,147,0 duplicate(mining) Variant Mineral#2 1907pay_dun00,53,146,0 duplicate(mining) Variant Mineral#3 1907pay_dun00,53,145,0 duplicate(mining) Variant Mineral#4 1907pay_dun00,69,148,0 duplicate(mining) Variant Mineral#5 1907pay_dun00,70,147,0 duplicate(mining) Variant Mineral#6 1907pay_dun00,70,146,0 duplicate(mining) Variant Mineral#7 1907
mrlongshen reacted to this -
try this, the part I added: while (1) from checking tools until the last proccess of mining and disable_items; in after the npc header
/*=========================================================Variant Miningby Glitch [Via]===========================================================Request: http://herc.ws/board/topic/1886-simple-mining/===========================================================Description:A simple mining system; allows for interacting players toexcavate minerals by "mining" them with special equipmentand tools.Configuration is done in arrays so that settings may bechanged with no modifications to the script. Keep in mindthat each array value is respective to their commented set.Duplicate in additional locations as needed.=========================================================*/pay_dun00,54,147,0 script Variant Mineral#1::mining 1907,{ disable_items; // Check equipment for (.@i = 0; .@i < getarraysize(.equip); .@i++) { if (!isequipped(.equip[.@i])) { message strcharinfo(0), "You need to have '"+ getitemname(.equip[.@i]) +"' equipped to mine!"; .@unequipped++; } } // Show count of equipment not worn if (.@unequipped) { message strcharinfo(0), .@unequipped +" of "+ getarraysize(.equip) +" equipment has not been worn."; end; } while(1) { // Check tools for (.@i = 0; .@i < getarraysize(.tool); .@i++) { if (countitem(.tool[.@i]) < .inventory[.@i]) { message strcharinfo(0), "You need to bring "+ .inventory[.@i] +" "+ getitemname(.tool[.@i]) +" to mine!"; .@gearless++; } } // Show count of tools not in inventory if (.@gearless) { if (getarraysize(.tool) > 1) .@grammar$ = "tools were"; else .@grammar$ = "tool was"; message strcharinfo(0), .@gearless +" of "+ getarraysize(.tool) +" "+ .@grammar$ +" not brought."; end; } // Progress message strcharinfo(0), "Mining in progress..."; progressbar "green", .progress; // Delete tools for (.@i = 0; .@i < getarraysize(.tool); .@i++) delitem .tool[.@i], .inventory[.@i]; // Audio/visual effects soundeffect .sound$, 0; specialeffect .effect; // Drop random debris getmapxy(.@m$, .@x, .@y, 0); makeitem .debris, .scatter, .@m$, .@x + rand(2), .@y + rand(1,2); // Randomize target mineral to mine .@target = rand(getarraysize(.mineral)); // Max range of success .@range = .success[.@target * 2 + 1]; // Check if failed if(rand(1, .@range) != .success[.@target * 2]) { message strcharinfo(0), "Nothing valuable was excavated..."; end; } // Get mineral(s) getitem .mineral[.@target], .amount[.@target]; message strcharinfo(0), "You have successfully mined "+ .amount[.@target] +" "+ getitemname(.mineral[.@target]) +"!"; } end; OnWhisperGlobal: // Whisper anything to initialize settings message strcharinfo(0), strnpcinfo(1) +" : 'OnInit' label has been intialized."; OnInit: // Minerals setarray .mineral[0], 985, 984, 6224, 6223; // Jejelopy, Elunium, Oridecon, Bradium, Cranium setarray .amount[0], 1, 1, 1, 1; // Amount to mine // Success rate: (x / y)% chance setarray .success[0], 1, 2, // 50% for Elunium 1, 2, // 50% for Oridecon 1, 4, // 25% Bradium 1, 4; // 25% Cranium //Example of calculation //1, 5, // 1/5 (20%) //1, 2, // 1/2 (50%) //4, 5, // 4/5 (80%) //1, 50; // 1/50 (2%) // Equipment setarray .equip[0], 5009, 2218; // Safety Helmet, Flu Mask // Tools setarray .tool[0], 7318, 7327; // Old Pick, Flashlight setarray .inventory[0], 1, 1; // Amount per tool // Mining time (in seconds) .progress = 1; // Audio/visual effects .sound$ = "chepet_attack.wav"; .effect = 4; // Debris .debris = 7049; // Stone .scatter = 5; // Debris amount end; }// Duplicatespay_dun00,55,147,0 duplicate(mining) Variant Mineral#2 1907pay_dun00,53,146,0 duplicate(mining) Variant Mineral#3 1907pay_dun00,53,145,0 duplicate(mining) Variant Mineral#4 1907pay_dun00,69,148,0 duplicate(mining) Variant Mineral#5 1907pay_dun00,70,147,0 duplicate(mining) Variant Mineral#6 1907pay_dun00,70,146,0 duplicate(mining) Variant Mineral#7 1907
mrlongshen reacted to this -
Ohh that file is not needed, I went through several iterations for this plugin, and forget to remove those include files..
About item charm, I will include it soon..
Thankyou
-
stumbled upon an error when compiling Extended Vending Plugin,
fatal error C1083: Cannot open include file: 'strlib.h': No such file or directory
Using MSVC++ 2010 Express, for now I disable it though i'm not sure if it will affect the proccess, but EVS plugin working all right in the test, hope you can shed the light if it all right or not to disable it...
and plugin item charm why it didn't available in your collection sir ?
-
use
KeepAfterUse: true/false (boolean, defaults to false)
-
-
-
which date ragexe did you use ?
-
that was strange, AFAIK this problem is happening because client files didn't have the skill in the skill tree of said class, check and make sure your skilltreeview.lua / skilltreeview.lub,
if you used the files from here you will have the right skilltreeview.lub, compare your files with the translation githubthe rangger class skill tree have the unlimit and it appearing in misc tab mean the ranger class didn't have unlimit skill in the skilltreeview.lub CMIIW...
[JOBID.JT_RANGER] = { [0] = SKID.RA_AIMEDBOLT, [1] = SKID.RA_RESEARCHTRAP, [3] = SKID.RA_RANGERMAIN, [4] = SKID.RA_ELECTRICSHOCKER, [5] = SKID.RA_WUGMASTERY, [7] = SKID.RA_ARROWSTORM, [8] = SKID.RA_CLUSTERBOMB, [9] = SKID.RA_DETONATOR, [10] = SKID.RA_CAMOUFLAGE, [12] = SKID.RA_TOOTHOFWUG, [13] = SKID.RA_WUGRIDER, [14] = SKID.RA_FEARBREEZE, [15] = SKID.RA_MAGENTATRAP, [16] = SKID.RA_FIRINGTRAP, [17] = SKID.RA_ICEBOUNDTRAP, [18] = SKID.RA_SENSITIVEKEEN, [19] = SKID.RA_WUGSTRIKE, [20] = SKID.RA_WUGDASH, [21] = SKID.RA_UNLIMIT, [22] = SKID.RA_COBALTTRAP, [26] = SKID.RA_WUGBITE, [29] = SKID.RA_MAIZETRAP, [36] = SKID.RA_VERDURETRAP, [41] = SKID.ALL_FULL_THROTTLE },
-
yes, you should try it offline before put it in your online server
-
try this
poring_w02,92,197,3 script Nadine#1 650,{ set .@n$, "[Nadine]"; setarray .@rwd[0], 25500, 1, 7; // Rewards: <item id>, <item amount>, <refine count> query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + getcharid(3) + "", .@lip$); if ( getd("$" + .@lip$ + "_NG") > 0 || #NewbieGift > 0) { mes .@n$; mes "I'm sorry, the rewards are exclusively for new players."; mes "If your Playing in a Cafe Please do post your IGN in Shop Players section with your Group."; mes "Thank you!"; close; } mes .@n$; mes "Nice to meet you "+ strcharinfo (0) +", my name is Nadine"; mes "Welcome to ^E066FFFate RO!^000000"; mes "I see that you're new here so to help you out I'd like to give you these"; mes "items as a gift to show how much we appreciate you here!"; for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 3 ) mes .@rwd[.@i+1] + " x +"+.@rwd[.@i+2]"" + getitemname(.@rwd[.@i]); close2; set #NewbieGift, 1; setd "$" + .@lip$ + "_NG", getd("$" + .@lip$ + "_NG") + 1; // getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; for ( set .@i, 0; .@i < getarraysize(.@rwd); set .@i, .@i + 2 ) getitem2 .@rwd[.@i], .@rwd[.@i+1], 1, .@rwd[.@i+2], 0, 0, 0, 0, 0; announce "Let's welcome " + strcharinfo(0) + " for joining our server ! ",0; end;OnInit: waitingroom "Solo Pack Gift!",0; end;}
-
-
it seem you got wrong lua files for the skills
-
you're wellcome, glad it work
-
firstly take a look at the map server when it loading the maps, if it not loaded when it should that will be notice or warning xx map removed, something like that message in the map server screen console
2ndly, check the maps.conf, map_index.txt containt the not loaded map and make sure you have added the not loaded map in map_chace.dat
3rdly, check the not loaded map file if it was corrupted
if you have done step above and still getting error, you can upload your not loaded map file here and try asking the help again, from my experience when it loaded 100% but got freezed it likely your client been patched to ignore missing file, may be the model or texture of the not loaded map is missing CMIIW
-
@@Quazi try this script: http://upaste.me/7bbc2166170cb9962
- shop rental_shop -1,501:50prontera,150,150,4 script Rentals Shop 100,{ callshop "rental_shop", 1; npcshopattach "rental_shop"; end;OnBuyItem: dispbottom "Rentals Shop: You can only buy one item at once."; setarray .@q[0], @bought_nameid[0], @bought_quantity[0]; for (.@i = 0; .@i < getarraysize(.items_list); .@i++) { if (.@q[0] == .items_list[.@i]) { .@q[2] = .price_list[.@i]; } } mes .@npc_name$ = "[Rentals Shop]"; mes "Rental Item: "+getitemname(.@q[0]); mes "Rental Cost: "+.@q[2]+"x "+getitemname(.currency)+" for one day."; mes " "; mes "How many days do you want to rent it ?"; next; if (input(.@day, 1, 365)) { mes .@npc_name$; mes "Invalid input days.."; callsub ClearBought; close; } .@q[3] = .@day * .@q[2]; mes .@npc_name$; mes "Rental Item: "+getitemname(.@q[0]); mes "Rental Cost: "+.@q[3]+"x "+getitemname(.currency)+" for "+.@day+" day"+((.@day > 1) ? "s" : "")+"."; mes " "; mes "Still want to make the rent ?"; next; if (select("Yes:No") == 2) { mes .@npc_name$; mes "All right, "+callfunc("F_Bye"); callsub ClearBought; close; } if (countitem(.currency) < .@q[3]) { mes .@npc_name$; mes "I'm sorry, you haven't enought "+getitemname(.currency)+" to pay the rental"; callsub ClearBought; close; } if (!checkweight(.@q[0], .@q[1])) { mes .@npc_name$; mes "You need more space in your inventory."; callsub ClearBought; close; } delitem .currency, .@q[3]; // delete items rentitem .@q[0], .@day * 86400; // rent an items. 86400 = 1 day in seconds callsub ClearBought; end; ClearBought: deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); return;OnInit: // Configuration setarray .items_list, 1201, 1201, 1201; // items list that you want to sell. setarray .price_list, 100, 200, 300; // itens price that item you sell in the shop. .currency = 7227; // items that will be used as exchange currency // do not touch from here!! npcshopdelitem "rental_shop", 501; for (.@i = 0; .@i < getarraysize(.items_list); .@i++) npcshopadditem "rental_shop", .items_list[.@i], .price_list[.@i]; end;}
RK RUNESTONE
in General Server Support
Posted
change
to
that will be Third + Upper Third + Baby Third jobs who can use the runes