Dastgir
Script Developers-
Content Count
3805 -
Joined
-
Last visited
-
Days Won
250
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Dastgir
-
Rewrite this script to work with new InstanceDB
Dastgir replied to xapaon123's question in Script Support
// ~~~~~ 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; .@[member=SEC] = .@left % 60; if ( .@day ) return .@day +" day "+ .@hour +" hour"; else if ( .@hour ) return .@hour +" hour "+ .@min +" min"; else if ( .@min ) return .@min +" min "+ .@[member=SEC] +" sec"; else return .@[member=SEC] +" sec"; } prontera,152,178,3 script szfjkii 406,{ mes "- each difficulty have 10 levels", "- each difficulty have given time to finish the instance", "- for Normal: 30 minutes", "- for Hard: 45 minutes", "- for Nightmare: 60 minutes", "- for Hardcore: 90 minutes"; next; // can re-enter if already generated if( getcharid(1) && instance_mapname(.map_inst$) != "" ) { if ( select( "Enter", "Cancel" ) -1 ) { mes "See ya."; close; } if ( has_instance( .map_inst$ ) == "" ) { mes "Your group is already registered at an other instance."; close; } getpartymember getcharid(1), 1; if ( $@partymembercount > .max_players ) { mes "Maximum of "+ .max_players +" members in the party"; close; } // check job if a player is invited if( .same_job ) { .@self = getcharid(3); for( .@i = 0; .@i < $@partymembercount; .@i++ ) { if( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) ) { attachrid( $@partymemberaid[ .@i ] ); .@job_name$ = .@job_name$ + jobname(Class) +"|"; } } attachrid( .@self ); if( countstr( .@job_name$, jobname(Class) ) > 1 ) { mes "sorry there is 2 same job in the party, you can't enter."; close; } } // check delay if a player is invited for( .@i = 0; .@i < getarraysize( getd( ".char_id"+ getcharid(1) ) ); .@i++ ) if( getd( ".char_id"+ getcharid(1) +"["+ .@i +"]" ) == getcharid(0) ) { .@pass = 1; break; } if( !.@pass ) { if( gettimetick(2) < Delay_instance ) { mes "sorry you must wait "+ callfunc( "timeleft__", Delay_instance - gettimetick(2) ) +" before enter"; close; } .@size = getarraysize( getd( ".char_id"+ getcharid(1) ) ); setd( ".char_id"+ getcharid(1) +"[ "+ .@size +" ]", getcharid(0) ); Delay_instance = gettimetick(2) + 3600 * 3; } instance_announce has_instance2(.map_inst$), strcharinfo(0)+" of the party "+ getpartyname( getcharid(1) ) +" is entering in the instance.",bc_map; warp has_instance( .map_inst$ ),50,50; end; } if ( select ( "Normal", "Hard", "Hardcore", "Nightmare", "Leave" ) == 5 ) {// using @menu for instancing mes "See ya."; close; } else if( !getcharid(1) ) { mes "You need to be in party ( Maximum of "+ .max_players +" members )."; close; } // check delay of players in the party getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; .@self = getcharid(3); for( .@i = 0; .@i < $@partymembercount; .@i++ ) { if( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) ) { attachrid( $@partymemberaid[ .@i ] ); if( gettimetick(2) < Delay_instance ) { .@name$ = strcharinfo(0); .@time = Delay_instance - gettimetick(2); attachrid( .@self ); mes "sorry "+ .@name$ +" must wait "+ callfunc( "timeleft__", .@time ) +" before enter"; close; } else if( compare( .@job_name$, jobname(Class) ) && .same_job ) { .@name$ = strcharinfo(0); .@job$ = jobname(Class); attachrid( .@self ); mes "sorry, "+ .@name$ +" is "+ .@job$ +" and there is already a "+ .@job$ +" in the party"; close; } .@job_name$ = .@job_name$ + jobname(Class) +"|"; } } attachrid( .@self ); if ( $@partymembercount > .max_players ) { mes "Maximum of "+ .max_players +" members in the party"; close; } else if( getpartyleader( getcharid(1),2 ) != getcharid(0) ) { mes "I only talk to your leader."; close; } mes "If the instance is successfully generated all your party will be warp inside. Get ready"; next; .@inst_id = instance_create(.name_inst$, getcharid(1)); if( .@inst_id < 0 ){ mes "Failed. Contact a GM."; close; } if ( instance_attachmap( .map_inst$, .@inst_id ) == "") { mes "^0000ff"+ .name_inst$ +" ^000000- Reservation Failed!"; instance_destroy(.@inst_id); close; } instance_set_timeout .timelimit[ @menu ], .timeidle, .@inst_id; instance_init .@inst_id; instance_attach .@inst_id; 'diff$ = .diff$[ @menu ]; 'party_id = getcharid(1); 'time_inst = gettimetick(2) + .timelimit[ @menu ]; 'inst_id = .@inst_id; 'max_players = .max_players; donpcevent instance_npcname( "Inst_cust" ) +"::Oninstancing"; sleep2 50; getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; .@self = getcharid(3); if( .same_job ) { .@job_name$ = ""; for( .@i = 0; .@i < $@partymembercount; .@i++ ) { if( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) ) { attachrid( $@partymemberaid[ .@i ] ); .@job_name$ = .@job_name$ + jobname(Class) +"|"; } } } // dispbottom .@job_name$; for( .@i = 0; .@i < $@partymembercount; .@i++ ) { if( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) ) { attachrid( $@partymemberaid[ .@i ] ); if( gettimetick(2) >= Delay_instance && countstr( .@job_name$, jobname(Class) ) <= 1 ) { Delay_instance = gettimetick(2) + 3600 * 3; .@size = getarraysize( getd( ".char_id"+ getcharid(1) ) ); setd( ".char_id"+ getcharid(1) +"[ "+ .@size +" ]", getcharid(0) ); warp has_instance( .map_inst$ ),50,50; } } } // warpparty has_instance( .map_inst$ ),50,50, getcharid(1); close; OnDelete: deletearray getd( ".char_id"+ getvariableofnpc( .party_id, "Inst_cust") ); end; OnInit: .same_job = 1; // DON'T allow 2 same job to enter in the instance .map_inst$ = "1@guild"; // instance map's name .name_inst$ = "Custom instance"; // instance name display .timeidle = 300; // time (sec) to re-enter in the instance when all players outside .max_players = 4; // max players in the party // time limit (sec) of the instance per level - Normal, Hard, Hardcore, Nightmare setarray .timelimit[ 1 ], 1800, 2700, 3600, 4500; // Difficulty's names - Don't touch setarray .diff$[ 1 ], "Normal", "Hard", "Hardcore", "Nightmare"; end; } 1@guild,0,0,0 script Inst_cust -1,{ function Countpartyonline; function Reward; OnInit: .npc_enter$ = "szfjkii"; // name of the NPC to enter in the instance // Number ( monsters / round / difficulty ) initialized setarray .mob_init_Normal[ 1 ], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; setarray .mob_init_Hard[ 1 ], 2, 3, 4, 5, 6, 7, 8, 9, 10, 12; setarray .mob_init_Hardcore[ 1 ], 3, 4, 5, 6, 7, 8, 9, 10, 11, 13; setarray .mob_init_Nightmare[ 1 ], 5, 6, 7, 8, 9, 10, 12, 14, 16, 20; // Hero ( points / round / difficulty ) - using #hero_points variable setarray .hero_points_Normal[ 1 ], 100,110,120,130,140,150,160,170,180,200; setarray .hero_points_Hard[ 1 ], 120,140,160,180,200,220,240,260,280,300; setarray .hero_points_Hardcore[ 1 ], 150,180,210,240,270,300,330,360,390,420; setarray .hero_points_Nightmare[ 1 ], 200,250,300,350,400,450,500,550,600,700; // Time (min) / round / difficulty setarray .time_Normal[ 1 ], 1,2,3,4,5,6,7,8,9,10; setarray .time_Hard[ 1 ], 2,4,6,8,10,12,14,16,18,20; setarray .time_Hardcore[ 1 ], 3,6,9,12,15,18,21,24,27,30; setarray .time_Nightmare[ 1 ], 4,8,12,16,20,24,28,32,36,40; // Mob ID / round // Level : Normal setarray .mob_ID_Normal_round1[ 0 ], 1002,1005,1004;// poring, hornet, familiar setarray .mob_ID_Normal_round2[ 0 ], 1002,1005; setarray .mob_ID_Normal_round3[ 0 ], 1002,1005,1004; setarray .mob_ID_Normal_round4[ 0 ], 1002,1005,1004; setarray .mob_ID_Normal_round5[ 0 ], 1002,1005,1004,1005; setarray .mob_ID_Normal_round6[ 0 ], 1002,1005,1004; setarray .mob_ID_Normal_round7[ 0 ], 1002,1005,1004; setarray .mob_ID_Normal_round8[ 0 ], 1002,1005,1004; setarray .mob_ID_Normal_round9[ 0 ], 1002,1005,1004; setarray .mob_ID_Normal_round10[ 0 ], 1002,1005,1004; // Level : Hard setarray .mob_ID_Hard_round1[ 0 ], 1002,1005,1004; setarray .mob_ID_Hard_round2[ 0 ], 1002,1005,1004; setarray .mob_ID_Hard_round3[ 0 ], 1002,1005,1004; setarray .mob_ID_Hard_round4[ 0 ], 1002,1005,1004; setarray .mob_ID_Hard_round5[ 0 ], 1002,1005,1004; setarray .mob_ID_Hard_round6[ 0 ], 1002,1005,1004; setarray .mob_ID_Hard_round7[ 0 ], 1002,1005,1004; setarray .mob_ID_Hard_round8[ 0 ], 1002,1005,1004; setarray .mob_ID_Hard_round9[ 0 ], 1002,1005,1004; setarray .mob_ID_Hard_round10[ 0 ], 1002,1005,1004; // Level : Hardcore setarray .mob_ID_Hardcore_round1[ 0 ], 1002,1005,1004; setarray .mob_ID_Hardcore_round2[ 0 ], 1002,1005,1004; setarray .mob_ID_Hardcore_round3[ 0 ], 1002,1005,1004; setarray .mob_ID_Hardcore_round4[ 0 ], 1002,1005,1004; setarray .mob_ID_Hardcore_round5[ 0 ], 1002,1005,1004; setarray .mob_ID_Hardcore_round6[ 0 ], 1002,1005,1004; setarray .mob_ID_Hardcore_round7[ 0 ], 1002,1005,1004; setarray .mob_ID_Hardcore_round8[ 0 ], 1002,1005,1004; setarray .mob_ID_Hardcore_round9[ 0 ], 1002,1005,1004; setarray .mob_ID_Hardcore_round10[ 0 ], 1002,1005,1004; // Level : Nightmare setarray .mob_ID_Nightmare_round1[ 0 ], 1002,1005,1004; setarray .mob_ID_Nightmare_round2[ 0 ], 1002,1005,1004; setarray .mob_ID_Nightmare_round3[ 0 ], 1002,1005,1004; setarray .mob_ID_Nightmare_round4[ 0 ], 1002,1005,1004; setarray .mob_ID_Nightmare_round5[ 0 ], 1002,1005,1004; setarray .mob_ID_Nightmare_round6[ 0 ], 1002,1005,1004; setarray .mob_ID_Nightmare_round7[ 0 ], 1002,1005,1004; setarray .mob_ID_Nightmare_round8[ 0 ], 1002,1005,1004; setarray .mob_ID_Nightmare_round9[ 0 ], 1002,1005,1004; setarray .mob_ID_Nightmare_round10[ 0 ], 1002,1005,1004; .round_max = 10; // round max end; // Instance start // -------------- Oninstancing: sleep 10000; // New round // --------- LStart: 'round++; instance_announce 'inst_id, 'round + ( 'round % 10 == 1 ? "st" : ( 'round % 10 == 2 ? "nd" : ( 'round % 10 == 3 ? "rd" : "th" ) ) ) +" round in :", bc_map; for( .@i = 5; .@i > 0; .@i-- ) { instance_announce 'inst_id, .@i +"" ,bc_map; sleep 1000; } donpcevent instance_npcname( "Inst_cust" ) +"::OnTimevent";// initialize time limit for the round goto OnRound; // Monster is dead : check player on map + reward if 0 mob // ------------------------------------------------------- OnMobDead: if( instance_check_party( 'party_id,'max_players +1 ) ) {// check if there are more than 4 players in the party instance instance_announce 'inst_id, "To much players. End of instance.", bc_map; 'round = .round_max + 1; goto L_pr; } 'count = mobcount( strnpcinfo(4), instance_npcname( "Inst_cust", 'inst_id ) +"::OnMobDead" ); instance_announce instance_id(0), 'count +" monsters left" ,bc_map; if( !'count ) { instance_announce 'inst_id, "All monsters on the "+ 'round + ( 'round % 10 == 1 ? "st" : ( 'round % 10 == 2 ? "nd" : ( 'round % 10 == 3 ? "rd" : "th" ) ) ) +" level have been defeated.", bc_map; Reward();// hero points / round / difficulty if( 'round == .round_max ) { 'round = .round_max + 1; goto L_end; } goto LStart; } end; // Random (spawn / round / difficulty) // ----------------------------------- OnRound: .@spawn = 'count = Countpartyonline() + getd( ".mob_init_"+ 'diff$ +"[ "+ 'round +" ]" );// spawn count = ( monster initialized / round / difficulty ) + number players online in party instance_announce 'inst_id, "you have "+ getd( ".time_"+ 'diff$ +"[ "+ 'round +" ]" ) +" min to finish this round in "+ 'diff$ +" mode. "+ .@spawn +" mobs are spawned",bc_map; while( .@spawn ) {// spawned ( monster / round / difficulty ) randomly .@[member=Rand] = rand( 1,.@spawn );// number mobs .@spawn = .@spawn - .@[member=Rand]; .@i = rand( getarraysize( getd( ".mob_ID_"+ 'diff$ +"_round"+ 'round ) ) );// ID mob monster "1@guild",0,0,"--ja--", getd( ".mob_ID_"+ 'diff$ +"_round"+ 'round +"[ "+ .@i +" ]" ), .@[member=Rand], instance_npcname( strnpcinfo(0),'inst_id )+"::OnMobDead"; } end; // End of instance // --------------- L_end: instance_announce 'inst_id, "Congratulation you have finished the instance in "+ callfunc( "timeleft__", 'time_inst - gettimetick(2) ), bc_map; OnTimevent:// time limit / round / difficulty awake instance_npcname( "Inst_cust" ); if( 'round <= .round_max ) { sleep 1; 'tmp = 'round; sleep 1000 * 60 * getd( ".time_"+ 'diff$ +"[ "+ 'round +" ]" ); if( 'round != 'tmp ) end; instance_announce 'inst_id, "you take to much time.", bc_map; } L_pr: instance_warpall "prontera", 152,178, 'inst_id; .party_id = 'party_id; donpcevent .npc_enter$ +"::OnDelete"; sleep 500; instance_destroy 'inst_id; end; // Functions // --------- function Countpartyonline { getpartymember 'party_id, 1; getpartymember 'party_id, 2; for( .@i = 0; .@i < $@partymembercount; .@i++ ) { if( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) && getarg( 0,1 ) ) .@j++; // else if( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) && !getarg( 0,1 ) ) { // attachrid( $@partymemberaid[ .@i ] ); // Delay_instance = gettimetick(2) + 3600 * 3; // } } return .@j; } function Reward { getpartymember 'party_id, 1; getpartymember 'party_id, 2; .@tmp$ = strcharinfo(3); for( .@i = 0; .@i < $@partymembercount; .@i++ ) if( isloggedin( $@partymemberaid[ .@i ], $@partymembercid[ .@i ] ) ) { attachrid( $@partymemberaid[ .@i ] ); if( strcharinfo(3) == .@tmp$ ) { #hero_points = #hero_points + getd( ".hero_points_"+ 'diff$ +"[ "+ 'round +" ]" ); dispbottom "Gained : "+ getd( ".hero_points_"+ 'diff$ +"[ "+ 'round +" ]" ) +" Hero Points. Total : "+ #hero_points; } } return; } // function Delayparty { // Countpartyonline( 0 ); // return; // } } 1@guild mapflag nowarp 1@guild mapflag partylock 1@guild mapflag nowarpto 1@guild mapflag noteleport 1@guild mapflag nosave SavePoint 1@guild mapflag nomemo 1@guild mapflag nobranch 1@guild mapflag monster_noteleport (Haven't looked into other parts except the instance commands) -
Too many patches :x I suggest to just use "Select Recommended" and try, if it doesn't crash, then choose patches one by one and try, so you would exactly get to know which patch is making your client crash. (I suspect Restore Model Culling)
-
I don't think it might be possible (correct me if I am wrong) The client requests name when you hover to any npc/char/monster, and server sends the name. so unless someone creates a new client to support saving of npc names or something like that , then its possible
-
Script should be case sensitive http://upaste.me/0276b0 The script is having many old methods,( i have just edited case to make map-server not throw warning)
-
Independent project, I am not working with Adelays, neither have worked with them before
-
1) you are using not too old version, add src to second parameter 2) you are using not too new Hercules either, remove the last false.
-
They should be in hercules/src/plugins/ not in hercules/plugins
-
Seems like afk.c doesn't exist in plugins folder
-
Its your webhosting problem, they might be blocking outgoing connections to the ports of your map/char/login server, thus its always showing offline, you can request your webhost to enable outgoing connections to ports 5121,6121,6900 (or other ports, if you have changed the default one's)
-
Updated and added, but have not tested it yet. Fixed the bug , thanks for reporting
-
then you might have it installed on source and not by plugin
-
just remove it from conf/plugins.conf
-
src/config/core.h #define AUTOTRADE_PERSISTENCY comment it and compile, and autotraders won't bother you.. for PhpMyAdmin, i don't know how you installed it, but if you have installed it normally, starting httpd is enough chkconfig httpd on ^ Above command will start httpd as vps boots
-
If its shown as *****, probably your client side manner is acting, and *** shown means client censored the words and ACTUALLY Sended those asterisks to the server, so this plugin won't be able to do anything when the server haven't received the correct word
-
Yes, autotraders appear as 0.0.0.0, since they are not actual players(so we cannot get their ip)
-
Hello Community, Once Again, I was doing something and found something unusual, the kRO have other methods of loading Items too.... They also load some idnum tables but with different names Unidentified items goes to eventnum2itemdisplaynametable.txt , eventnum2itemdesctable.txt , eventnum2itemresnametable.txt Identified items: eventidnum2itemdisplaynametable.txt , eventidnum2itemdesctable.txt , eventidnum2itemresnametable.txt (Just add event prefix to all file names ) Points to Remember: This file is loaded before itemInfo, so if you have same item in itemInfo, resname and displayname will be overwritten with one on itemInfo, while both Description will appear one below one. It Works, and I have tested. These Files go inside GRF(data folder) as idnum tables used to..(before) Works on All clients with itemInfo.lub support How it Looks When Overwritten:
-
Mechanic might release on next maintenance (19 Jan)
-
Almost to initial stage of completion... Would be coding server side(Web) and starting beta test soon...
-
Just use new client then xD
-
I don't know why you are switching armors then o_O well, technically you are unequipping current armor and equipping new armor, so the stats are recalculated 2 times , thus making hp drop
-
AFAIK, theres 4 script provided with Kami Package, you should load those too, they have setlook2 function
-
function through pointer' : too few arguments for call
Dastgir replied to REKT's question in Plugin Support
Seems like you have modified some function declarations, so you might need to regenerate the HPMHook, see tools/HPMHookGen Folder -
Hello Community, Yesterday, I was trying to make Quest Appear on other TAB's and result was successful. Prerequisite: You need latest ROClientside Repository : https://github.com/ROClientSide/Translation/ https://github.com/ROClientSide/Translation/commit/9d93ef1 (This Commit is necessary) you need Client >= 2014-10-22 (Haven't Tested with old clients, You can test and tell if it works ) Here's a Guide: questluafilelist.lub: You need 2 files, local_XYZquest_list and l_XYZ_list and in the folders as mentioned below: Add Following lines to questluafilelist.lub(at end of file) without EXTENSIONS as mentioned below: Add[[localquest\local_dastgirquest_list]] Add[[localquest\questinfo\l_dastgir_list]] local_dastgirquest_list.lub(Sample Files, Modify to your needs): LOCAL_DastgirQuest_List = { { name = [[Dastgir Custom Quests]], imagefile = [[ep_test_sample.bmp]], list = { { name = [[Novice]], list = { { name =[[Test1]], scrfilename = [[DastgirQuest]], questID = 1019, }, { name =[[Test2]], scrfilename = [[DastgirQuest]], questID = 1017, } } }, { name = [[Quests 11~25]], list = { { name =[[11-15]], scrfilename = [[DastgirQuest]], questID = 1017, }, { name =[[16-20]], scrfilename = [[DastgirQuest]], questID = 1019, }, } } } } } _G.QuestTable.add(LOCAL_DastgirQuest_List, "EVENT") It needs Following line at the bottom for compulsary _G.QuestTable.add(LOCAL_XYZQuest_List, "TAB") where TAB's are EVENT LOCAL EP NEW RECOMMENDED Replace LOCAL_XYZQuest_List with Table name at top of this file... l_dastgir_list.lub(Sample File, Modify to your needs): DastgirQuest_List = { [1019] = { NPCFromName = [[Dastgir]], NPCFromMap = [[new_1-1]], NPCFromSpr = [[4_M_01]], NPCFromX = 63, NPCFromY = 53, NPCToName = [[Dastgir]], NPCToMap = [[prontera]], NPCToSpr = [[4_M_01]], NPCToX = 86, NPCToY = 84, Item = [[]], PrizeItem = [[]], Title = [[Event QuestInfo ]], Info = [[Testing the Event.]], QuickInfo = [[QuickInfo.]], Hunt1 = [[]], Hunt2 = [[]], Hunt3 = [[]], Time = [[0]], LV = [[0]], }, [1017] = { NPCFromName = [[Dastgir-1]], NPCFromMap = [[prontera]], NPCFromSpr = [[4_BRICKPILE]], NPCFromX = 84, NPCFromY = 123, NPCToName = [[Dastgir-2]], NPCToMap = [[payon]], NPCToSpr = [[4_BOARD3]], NPCToX = 76, NPCToY = 114, Item = [[]], PrizeItem = [[]], Title = [[Event QuestInfo ]], Info = [[Testing the Event.]], QuickInfo = [[QuickInfo.]], Hunt1 = [[Alarm]], Hunt2 = [[]], Hunt3 = [[]], Time = [[0]], LV = [[0]], }, } _G.QuestTable.addList("DastgirQuest",DastgirQuest_List) In this file too, you need Following line in the end _G.QuestTable.addList("XYZQuest",XYZQuest_List) where XYZQuest_List is table_name(mentioned in first line of this file), (Please see the quotes) and that's it. put it into your GRF, and it will work NOTE: Many Functions are modified, so you would need quest_function.lub provided in the repository ScreenShot: Please Don't Remove credits in the quest_function file...
-
Map is not available means map-server is down probably show what error is there on map/char-server console, so we can help better.