Jump to content

NexusXVI

Members
  • Posts

    227
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by NexusXVI

  1. Thank you so much GM Ocean a good and clean tutorial I'll update if this works Followed it and got this results on the log : battle.c: In function ‘battle_can_hit_gvg_target’: battle.c:1317: warning: suggest parentheses around ‘&&’ within ‘||’ battle.c:1325: warning: suggest parentheses around ‘&&’ within ‘||’ battle.c:1374: error: invalid storage class for function ‘battle_calc_drain’ battle.c:1577: error: invalid storage class for function ‘battle_calc_base_damage’ battle.c:1690: error: invalid storage class for function ‘battle_range_type’ battle.c:1710: error: invalid storage class for function ‘battle_blewcount_bonus’ battle.c:1856: error: invalid storage class for function ‘target_has_infinite_defense’ battle.c:1879: error: invalid storage class for function ‘is_skill_using_arrow’ battle.c:1897: error: invalid storage class for function ‘is_attack_right_handed’ battle.c:1917: error: invalid storage class for function ‘is_attack_left_handed’ battle.c:1946: error: invalid storage class for function ‘is_attack_critical’ battle.c:2013: error: invalid storage class for function ‘is_attack_piercing’ battle.c:2052: error: invalid storage class for function ‘battle_skill_get_damage_properties’ battle.c:2068: error: invalid storage class for function ‘is_attack_hitting’ battle.c:2209: error: invalid storage class for function ‘attack_ignores_def’ battle.c:2258: error: invalid storage class for function ‘battle_skill_stacks_masteries_vvs’ battle.c:2306: error: invalid storage class for function ‘battle_get_weapon_element’ battle.c:2390: error: invalid storage class for function ‘battle_calc_element_damage’ battle.c:2460: error: invalid storage class for function ‘battle_calc_attack_masteries’ battle.c:2767: error: invalid storage class for function ‘battle_calc_multi_attack’ battle.c:2832: error: invalid storage class for function ‘battle_calc_attack_skill_ratio’ battle.c:3733: error: invalid storage class for function ‘battle_calc_skill_constant_addition’ battle.c: In function ‘battle_calc_attack_plant’: battle.c:4182: warning: suggest parentheses around ‘&&’ within ‘||’ battle.c: In function ‘battle_can_hit_gvg_target’: battle.c:4411: error: invalid storage class for function ‘initialize_weapon_data’ battle.c:4573: error: invalid storage class for function ‘battle_calc_weapon_attack’ battle.c:4809: error: static declaration of ‘battle_calc_magic_attack’ follows non-static declaration battle.c:1844: note: previous declaration of ‘battle_calc_magic_attack’ was here battle.c:5480: error: static declaration of ‘battle_calc_misc_attack’ follows non-static declaration battle.c:1845: note: previous declaration of ‘battle_calc_misc_attack’ was here battle.c: In function ‘battle_damage_area’: battle.c:6099: warning: suggest parentheses around ‘&&’ within ‘||’ battle.c: In function ‘battle_check_target’: battle.c:6763: warning: suggest parentheses around ‘&&’ within ‘||’ battle.c:6788: warning: suggest parentheses around ‘&&’ within ‘||’ battle.c: In function ‘battle_can_hit_gvg_target’: battle.c:7501: error: invalid storage class for function ‘rAthena_report_timer’ battle.c:7669: error: expected declaration or statement at end of input
  2. Patskie the script works but : 1. Timer won't show, and rounds loop back - Maybe its because of the timer, watched the players test it when they can't kill the monsters on the said time the rounds loop back ex : Round [ 1 ] then Round [ 2 ] then back to Round [ 1 ]. *PS. no map error , 2. After successfully killing every mobs in Round 4 within the time limit since I set it to 25 mins . It goes back to Round 1 not Going to Round 5 - MVP Round 3. The script doesn't warp them back to their respective save points event if they stay 2 hours there D:
  3. Is it possible to have a different empeium on each and every castle? With Different MOB ID's (Custom EMPERIUM perhaps)>? Because I want to have a baby woe with no custom items nor mvp card enabled my current emperium hp is on 3M and they literally spend 40mins just to break it .. which is kinda discouraging.
  4. Well I have this WoE on prt castles and geffen castles I need a different Emperium on Geffen Castle a little less hp but has different race and element (I can do the emp) Meaning the Emperium on Prt Castles are literally Different with the Gef Castles But because they both read the same mob which is 1288 , I can't really make a decent script cause I don't have that much talent yet So I need a cute script that will make a simple new Emperium on gef castle ! bumb
  5. Can you teach me how to , cause i don't want breakers to be as easy as it is .. give them more challenge
  6. So is making a new emperium on a different castle imposible? So is making a new emperium on a different castle imposible?
  7. On AgitMain saw this line if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) { monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak"; } end; I was wondering what if I made a new emperium or an emperium of different kind and hp. im not that sure but is this right? if (!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")) { monster strnpcinfo(2),.@emproom[0],.@emproom[1],"Emperium",1288,1,"Agit#"+strnpcinfo(2)+"::OnAgitBreak"; } else(!mobcount(strnpcinfo(2),"Agit#"+strnpcinfo(2)+"::OnAgitBreak")){ monster strnpcinfo(2),.@emproom[2],.@emproom[3],"Emperium",4000,1,"Agi#"+strnpcinfo(2)+"::OnAgitBreak"; } end; And mayber changing this : else if (strnpcinfo(2) == "gefg_cas01") { setarray .@emproom[0],197,181; } else if (strnpcinfo(2) == "gefg_cas02") { setarray .@emproom[0],176,178; } else if (strnpcinfo(2) == "gefg_cas03") { setarray .@emproom[0],244,166; } else if (strnpcinfo(2) == "gefg_cas04") { setarray .@emproom[0],174,177; } else if (strnpcinfo(2) == "gefg_cas05") { setarray .@emproom[0],194,184; } into this : else if (strnpcinfo(2) == "gefg_cas01") { setarray .@emproom[2],197,181; } else if (strnpcinfo(2) == "gefg_cas02") { setarray .@emproom[2],176,178; } else if (strnpcinfo(2) == "gefg_cas03") { setarray .@emproom[2],244,166; } else if (strnpcinfo(2) == "gefg_cas04") { setarray .@emproom[2],174,177; } else if (strnpcinfo(2) == "gefg_cas05") { setarray .@emproom[2],194,184; } is that possible? I would like some comments from the pro's xD
  8. NexusXVI

    Max Aspd

    Well its not about 3rd job, Maybe a working script that will let second jobs max aspd to not exceed 190.
  9. NexusXVI

    Max Aspd

    It is possible to set the Maximum ASPD of a certain Job differently from others? Ex. Server Max ASPD for trans is 195 while for Normal Second Job it is 190
  10. Dropped and retested, it seems that only 1 player can redeem it once meaning , Ex. Player 1 got the code, entered the code, got the reward and re - entered the code again and got the message "You can only redeem once" Then Player 1 tells Player 2 the code , Player 2 got the code , entered the code, got the reward, re - enter the code, got another reward, re - enter the code and then got another reward Every Reward he gets gives the SQL Error [SQL]: DB error - Duplicate entry 'pw5br2cg7q' for key 'PRIMARY' [Debug]: at script.c:15156 - INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('pw5br2cg7q',NOW(),2000312) [Debug]: Source (NPC): promoclaim (invisible/not on a map) PS. This is the option on Using it on multiple accounts, meaning the code can and must be used on different account once! To make it more clear here is the pictures : 1. The Options 2. Either usable on 1 or more accounts, Selected 0 (Zero) so it can be used by other accounts but only once 3. The Issue, The first picture was on the first one to claim the said price.. The price is 7608 (Premium Ticket) *ignore the blank card* as you can see he claimed it only once..the second time he tried the code a confirmation appears "You already claimed this promotional code." Which is what I was hoping for. but.... The second picture shows the second one to claim the price., he/she can get the price over and over and over again.. as long as he/she is not the first one to claim it.. I hope you understand me now and im guessing it's on the table so here it is : CREATE TABLE IF NOT EXISTS `reward_codes` ( `code` varchar(10) NOT NULL DEFAULT '', `nameid` int(11) unsigned NOT NULL DEFAULT '0', `item_name` varchar(45) NOT NULL DEFAULT '', `amount` smallint(6) unsigned NOT NULL DEFAULT '0', `time_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `allow_multiple` int(11) NOT NULL, PRIMARY KEY (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `rewardlogs` ( `code` varchar(10) NOT NULL DEFAULT '', `redeem_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `account_id` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Bump
  11. Did that and still this error persist : : DB error - Duplicate entry 'ifp7bhe3ck' for key 'PRIMARY'[Debug]: at script.c:15156 - INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('ifp7bhe3ck',NOW(),2000045) [Debug]: Source (NPC): promoclaim (invisible/not on a map) + Some characters Can still get multiple items some cannot
  12. I see so its not possible , but adding effects like stone curse of frozen status is ok right?
  13. //===== Custom Script ======================================== //= Promotional Codes //===== By: ================================================== //= Arzzzae //= Rewritten by Peopleperson49 @ version 1.1. //===== Current Version: ===================================== //= 1.8 //===== Compatible With: ===================================== //= Latest svn //===== Description: ========================================= //= Allows GM's to setup promocodes ingame for players. //===== Additional Comments: ================================= //= 1.0 Initial Release by Arzzzae. //= 1.1 Modified it to allow any length code. //= 1.2 Added option to choose whether its works any multiple //= accounts or one time use only. Added allow_multiple //= column to reward_codes table. //= 1.3 Added option to generate random 10 character/number //= code. //= 1.4 Changed the bindatcmd command to @promocode instead of //= @claim and @codesetup instead of @code. //= 1.5 Cleaned up the menus to flow better and eliminate //= unnessary text. //= 1.6 Change a lot of the dispbottom to mes. //= 1.7 Added whether the code allows multiple to the view //= existing promocodes. //= 1.8 Added sql tables to bottom of document. //============================================================ - script promoclaim -1,{ OnInit: bindatcmd "promocode",strnpcinfo(3)+"::OnClaim"; bindatcmd "codesetup",strnpcinfo(3)+"::OnEditCode",99,0; end; OnClaim: mes "^FF0000 Enter your promotional code."; input .@pc$; close2; if(query_sql("SELECT nameid,amount FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"'",.@item,.@amt)==0) { dispbottom "Invalid promotional code."; end; } if(query_logsql("SELECT code,account_id FROM `rewardlogs` WHERE `code`='"+escape_sql(.@pc$)+"' AND `account_id`='"+getcharid(3)+"'")) { dispbottom "You already claimed this promotional code."; end; } else if(query_logsql("SELECT code,allow_multiple FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"' AND `allow_multiple`='1'")) { getitem .@item,.@amt; dispbottom "Promotional code successfully redeemed."; query_sql ("SELECT COUNT(code) FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"'", .@pcode_exists); if(.@pcode_exists) { query_sql ("DELETE FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"'"); end; } else { dispbottom "Promotional code not found."; } end; } else if(query_logsql("SELECT code,allow_multiple FROM `reward_codes` WHERE `code`='"+escape_sql(.@pc$)+"' AND `allow_multiple`='0'")) { getitem .@item,.@amt; dispbottom "Promotional code successfully redeemed."; query_logsql("INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('"+.@pc$+"',NOW(),"+getcharid(3)+")"); end; } dispbottom "Rugby is not for everyone!"; end; OnEditCode: switch(prompt("Create random promocode.:Create custom promocode.:View existing promocodes.:Delete existing promocodes.")) { case 1: setarray .@RandomChar$[1],"a","b","c","d","e","f","g","h","i","j","k","m","n","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9"; set .@CharPick1$,.@RandomChar$[rand(1,33)]; set .@CharPick2$,.@RandomChar$[rand(1,33)]; set .@CharPick3$,.@RandomChar$[rand(1,33)]; set .@CharPick4$,.@RandomChar$[rand(1,33)]; set .@CharPick5$,.@RandomChar$[rand(1,33)]; set .@CharPick6$,.@RandomChar$[rand(1,33)]; set .@CharPick7$,.@RandomChar$[rand(1,33)]; set .@CharPick8$,.@RandomChar$[rand(1,33)]; set .@CharPick9$,.@RandomChar$[rand(1,33)]; set .@CharPick10$,.@RandomChar$[rand(1,33)]; set .@pcode$,""+.@CharPick1$+""+.@CharPick2$+""+.@CharPick3$+""+.@CharPick4$+""+.@CharPick5$+""+.@CharPick6$+""+.@CharPick7$+""+.@CharPick8$+""+.@CharPick9$+""+.@CharPick10$+""; mes "The computer has generated a random promotional code of: ^0000FF"+.@pcode$+"^000000"; next; query_sql ("SELECT COUNT(code) FROM `reward_codes` WHERE `code`='"+escape_sql(.@pcode$)+"'", .@pcode_exists); if(.@pcode_exists) { mes "Sorry, that code already exist."; close; } mes "The computer has generated ^FF0000"+.@pcode$+"^000000 as the promocode."; mes " "; mes " "; mes "Please set a reward for the player who has entered the code."; input .@reward; next; if(.@reward==0) { mes "Sorry, that is an invalid item id."; close; } set .@iname$,getitemname(.@reward); mes "How many ^FF0000"+.@iname$+"s^000000 would you like to give?"; input .@amount; if(.@amount==0) { next; mes "Sorry, that is an invalid amount number."; close; } next; mes "Do you want this code to be usable on more than one account? Input ^FF00000^000000 to allow multiple or ^FF00001^000000 for single use."; input .@multiple; next; mes "You have setup the prize to be:"; mes "^0000FF"+.@amount+"^000000 ^FF0000"+.@iname$+"^000000."; if(.@multiple==0) { mes "It is setup to be useable on multiple accounts once."; } else { mes "It is setup to only be valid one time."; } if(select("Yes:No, thanks")==2) { close; } query_sql ("INSERT INTO `reward_codes` (code,nameid,item_name,amount,time_created,allow_multiple) VALUES ('"+.@pcode$+"', "+.@reward+", '"+.@iname$+"', "+.@amount+", NOW(),'"+.@multiple+"')"); dispbottom "Promotional Code ^FF0000"+.@pcode$+" ^000000is now activated and the reward is ^FF0000"+.@amount+" "+.@iname$+"."; end; case 2: mes "Please specify what you would like the new code to be?"; input .@pcode$; if(getstrlen(.@pcode$)<1) { mes "You must enter something."; close; } next; query_sql ("SELECT COUNT(code) FROM `reward_codes` WHERE `code`='"+escape_sql(.@pcode$)+"'", .@pcode_exists); if(.@pcode_exists) { mes "Sorry, that code already exist."; close; } mes "You have entered ^FF0000"+.@pcode$+"^000000 as the code."; mes " "; mes " "; mes " "; mes "Please set a reward for the player who has entered the code."; input .@reward; next; if(.@reward==0) { mes "Sorry, that is an invalid item id."; close; } set .@iname$,getitemname(.@reward); mes "How many ^FF0000"+.@iname$+"s^000000 would you like to give?"; input .@amount; if(.@amount==0) { next; mes "Sorry, that is an invalid amount number."; close; } next; mes "Do you want this code to be usable on more than one account? Input ^FF00000^000000 to allow multiple or ^FF00001^000000 for single use."; input .@multiple; next; mes "You have setup the prize to be:"; mes "^0000FF"+.@amount+"^000000 ^FF0000"+.@iname$+"^000000."; if(.@multiple==0) { mes "It is setup to be useable on multiple accounts once."; } else { mes "It is setup to only be valid one time."; } if(select("Yes:No, thanks")==2) { close; } query_sql ("INSERT INTO `reward_codes` (code,nameid,item_name,amount,time_created,allow_multiple) VALUES ('"+.@pcode$+"', "+.@reward+", '"+.@iname$+"', "+.@amount+", NOW(),'"+.@multiple+"')"); dispbottom "Promotional Code ^FF0000"+.@pcode$+" ^000000is now activated and the reward is ^FF0000"+.@amount+" "+.@iname$+"."; end; case 3: set .@nb, query_sql("SELECT code, item_name, amount, allow_multiple amount FROM `reward_codes` ORDER BY time_created DESC LIMIT 100", .@code$, .@nid$, .@amount, .@allowmulti); if(.@nb==0) { dispbottom "No existing codes."; end; } dispbottom "============================================="; dispbottom "============== EXISITING CODES =============="; dispbottom "============================================="; for(set .@i,0; .@i < .@nb; set .@i,.@i+1) { dispbottom ""+.@code$[.@i]+" (Reward: "+.@amount[.@i]+" "+.@nid$[.@i]+") ("+(.@allowmulti[.@i]==0?"Multiple account use.":"One time use only.")+")"; } dispbottom "============================================="; end; case 4: input .@dcode$; query_sql ("SELECT COUNT(code) FROM `reward_codes` WHERE `code`='"+escape_sql(.@dcode$)+"'", .@pcode_exists); if(.@pcode_exists) { mes "Would you like to delete that code?"; next; if(select("Yes:No, thanks")==2) { close; } query_sql ("DELETE FROM `reward_codes` WHERE `code`='"+escape_sql(.@dcode$)+"'"); mes "Promotional code successfully deleted."; close; } dispbottom "Promotional code not found."; end; case 255: close; } } /* CREATE TABLE IF NOT EXISTS `reward_codes` ( `code` varchar(10) NOT NULL DEFAULT '', `nameid` int(11) unsigned NOT NULL DEFAULT '0', `item_name` varchar(45) NOT NULL DEFAULT '', `amount` smallint(6) unsigned NOT NULL DEFAULT '0', `time_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `allow_multiple` int(11) NOT NULL, PRIMARY KEY (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `rewardlogs` ( `code` varchar(10) NOT NULL DEFAULT '', `redeem_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `account_id` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`code`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; */ This was the Edited version of Peoplesperson of the utility script "Promotional Code" at this topic http://rathena.org/board/topic/80676-utility-utility-promotional-codes/ This maybe dead or too old but I think this is kinda useful: There are 2 Problems here : 1. When you choose if the code can be used by multiple accounts.. -.- It literally can be used by the same account over and over and over again, my thoughts was it can be used by different accounts not by the same one more times than you can count 2. Im having this errors on the map [Debug]: Source (NPC): promoclaim (invisible/not on a map) [Warning]: script:query_sql: Too many columns, discarding last 2 columns. [Debug]: Source (NPC): promoclaim (invisible/not on a map) [SQL]: DB error - Duplicate entry 'H6EfUa3jq4' for key 'PRIMARY' [Debug]: at script.c:15156 - INSERT INTO `rewardlogs` (code,redeem_time,account_id) VALUES ('H6EfUa3jq4',NOW(),2000045) [Debug]: Source (NPC): promoclaim (invisible/not on a map) [Warning]: script:query_sql: Too many columns, discarding last 2 columns. [Debug]: Source (NPC): promoclaim (invisible/not on a map) [Warning]: script:query_sql: Too many columns, discarding last 2 columns. [Debug]: Source (NPC): promoclaim (invisible/not on a map) [Warning]: script:query_sql: Too many columns, discarding last 2 columns. [Debug]: Source (NPC): promoclaim (invisible/not on a map) It it anyway posible to be fixed?
  14. Haha It it posible to add the effect of "Consuming EDP" like what you said upon using @at command? Promise I'll buy you a coffee /no1
  15. Topic says it all How to make the character die with zero hp when using @at , My vending zone is at town itself and also my invasion so the vending characters literally scatter Can anybody help?
  16. Im using Client date 2013-08-07 in clientinfo.xml , I set it to langtype 0 Diffed the Client , Only select login background , ticked the First and Second used http://rathena.sourceforge.net/tools/login_background/ to split the log in background into pieces and put it inside data/texture/유저인터페이스 Used it in Grf Reading Client same as the Data Folder Reading Client both not working Problems : @mail = cannot click the send window. in the mail interface / tried using different lang types but flag emotixs are not working (Ctrl + 1 - 9) so I'd rather stick to langtype 0 Login Background = it's literally not working.. the screen isn't going black..meaning the client doesn't read it.. Tried everything even put it inside login_interface folder.. still won't work Here is the name of the login background split files : t_배경1-1 t_배경1-2 t_배경1-3 t_배경1-4 Anyone who can shed any light about this problems? Appreciate it
  17. Ok ok Im just new about this in rA hahah never had a chance to change it @joelolopez.. I'll try it Lol did what you said.. Re diffed the client and still it wont work xD Fixed it already thanks
  18. Im pretty sure it's inside the data/texture/ the file format is 24-bit . BMP file inside the grf. client is diffed to read , multiple grf and read data folder is unticked The problem is.. The src logo is still not showing up.
  19. Just use put this at the end of your pvp warper script //Pvp Exit <Map>,<x>,<y>,<p> script ExitGate 406,{ warp "<Map>",<x>,<y>; } edit <Map> ,<x>,<y>,<p> First <Map> for your Pvp Map and the second <Map> is from where you want them to go when they click the npc. <x>,<y> for your coordinates and <p> for the npc facing position
  20. One last thing Can you re edit the script so that it'll use player timer not npctimer thnx!!
  21. No error on map server but it doesnt work //======Name======================================== // Town Invasion //======Version===================================== // 2.1 //======Author(s)=================================== // Sandbox //======Comments==================================== // Summons 2~5 MvP on a random town every 1~23hrs. // Those who killed the MvPs will receive a prize. //================================================== - script TownInvasion -1,{ OnClock0000 OnCLock0300 OnClock0600 OnClock0900 OnClock1200 OnClock1500 OnClock1800 OnClock2100: if(gettime(3) % 2 == 1 && !agitcheck() && !agitcheck2()) { for(.@i = 0; .@i < 4; .@i++) { //Spawn on 4 towns .Town_Invade$ = .Town$[rand(getarraysize(.Town$))]; announce .Town_Invade$+" Guard: Help us! Our town is being invaded!",bc_blue|bc_all; for(.@ix = 0; .@ix < 5; .@ix++) { //MvP spawner monster .Town_Invade$,0,0,"--ja--",.MvP[rand(getarraysize(.MvP))],1,strnpcinfo(1)+"::OnInvadeDeath"; } for(.@iy = 0; .@iy < 100; .@iy++) { //Mob spawner monster .Town_Invade$,0,0,"--ja--",-1,1,strnpcinfo(1)+"::OnMobsDeath"; } } } end; OnInvadeDeath: .@RandMvP = rand(getarraysize(.Prize)); getitem .Prize[.@RandMvP],.PAmt[.@RandMvP]; end; OnMobsDeath: .@RandMob = rand(getarraysize(.Prize2)); getitem .Prize2[.@RandMob],.PAmt2[.@RandMob]; end; OnInit: //Towns to Invade setarray .Town$[0],"louyang","prontera","payon"; //MvPs to summon setarray .MvP[0],2068,1785,1312; //Prize to give MVP setarray .Prize[0],674,6024,6187; setarray .PAmt[0],3,1,150; //Prize to give Mobs setarray .Prize2[0],6187; setarray .PAmt2[0],150; end; } Heree's what I did
  22. Currently untested but yeah. prontera,100,100,5 script hourlypoints 139,8,11,{ end; OnTouch: dispbottom "Stay here to get afk hourly points."; attachnpctimer(); startnpctimer(); end; OnTimer3600000: getmapxy(.@map$,.@x,.@y,0); if( distance(.x,.y,.@x,.@y)<=11 && .@map$==.map$ ) { if( !@afk ) { set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt; dispbottom "You received "+.point_amt+" Kafrapoints by staying afk ingame for 1 hour"; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; set @consecutive_hour, @consecutive_hour + 1; if(@consecutive_hour == 3) { set @consecutive_hour,0; set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt; dispbottom "You receive "+.cpoint_amt+" Kafrapoints in afking for 3 consecutive hours"; dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints"; } } else if( @afk>=gettimetick(2) ) { set #KAFRAPOINTS, #KAFRAPOINTS + .off_point_amt; set @consecutive_hour, @consecutive_hour + 1; if(@consecutive_hour == 3) { set @consecutive_hour,0; set #KAFRAPOINTS, #KAFRAPOINTS + .coff_point_amt; } } else { stopnpctimer(); set(.@player$, strcharinfo(0)); detachrid; atcommand "@kick \""+.@player$+"\""; end; } attachnpctimer(); initnpctimer(); } else { dispbottom "You left the afk area and will no longer receive Kafrapoints."; stopnpctimer(); } end; OnAFK: set(@afk,1); atcommand "@afk"; end; OnInit: getmapxy(.map$,.x,.y,1); bindatcmd "afk","hourlypoints::OnAFK"; set .cpoint_amt, 50; //Points gained for consecutive time online. set .point_amt, 10; //Normal points gained. set .coff_point_amt, 10; //Points gained for consecutive time offline. set .off_point_amt, 5; //Normal offline points gained. } prontera,0,0,5 script Offline AFK 100,{ set .@npc$, strnpcinfo(1); mes "["+.@npc$+"]"; mes "Would you like to activate offline afk?"; next; if(select("Yes:No")==2) { mes "["+.@npc$+"]"; mes "Alright, maybe next time."; close; } mes "["+.@npc$+"]"; mes "Ok, how long would you like to afk offline?"; next; set @menu, select(.menu$)-1; if(Zeny>=.pric[@menu]) { set(Zeny, Zeny-.pric[@menu]); mes "["+.@npc$+"]"; mes "See you soon!"; close2; set(@afk,gettimetick(2)+(.time[@menu]*60)); atcommand "@afk"; } else { mes "["+.@npc$+"]"; mes "I'm sorry but it seems you don't have enough Zeny for that..."; close2; } end; OnInit: function t { function s; set .@left, getarg(0); if ( .@left <= 0 ) return getarg(0); set .@day, .@left / 86400; set .@hour, .@left % 86400 / 3600; set .@min, .@left % 3600 / 60; set .@sec, .@left % 60; return ( ( .@day ? .@day +" day"+ s( .@day ) : "" ) + ( .@hour ? .@hour +" hour"+ s( .@hour ) : "" ) + ( .@min ? .@min +" min"+ s( .@min ) : "" ) + ( .@sec ? .@sec +" sec"+ s( .@sec,1 ) : "" ) ); function s { return ( ( getarg(0) > 1 ? "s" : "" ) + ( getarg(1,0) ? "" : " " ) ); } } setarray .time, 10, 30, 60, 120, 240, 480; //In minutes setarray .pric, 1500, 4400, 8800, 17600 35300, 70000; //In Zeny set .len, getarraysize(.time); unitwarp 0, getvariableofnpc(.map$,"hourlypoints"), getvariableofnpc(.x,"hourlypoints"), getvariableofnpc(.y,"hourlypoints") ; for(set(.@a,0);.@a<.len;set(.@a,.@a+1)) set(.menu$,.menu$+t(.time[.@a]*60)+" for "+.pric[.@a]+" Zeny.:"); } Variations ( shortcuts ) of the command @afk may be used to abuse this system for example @autotrade ( @at )... I recommend you add them after... bindatcmd "afk","hourlypoints::OnAFK"; Like... bindatcmd "autotrade","hourlypoints::OnAFK"; I've read some topics and the wiki and found out that binatcmdam disables a certain atcommand but I've tested it and removed the @afk command on the group.conf and because of bindatcmd "afk","hourlypoints::OnAFK"; they can still use the command, as last resort I removed bindatcmd "afk","hourlypoints::OnAFK"; on the script and now they can't use @afk But still im having a problem with @autotrade I referred to this topic : http://rathena.org/board/topic/70006-disable-specific-commands-in-a-map/ and added this script - script nocommand -1,{ OnInit: bindatcmd("autotrade","nocommand::OnAtcommand"); end; OnAtcommand: if( strcharinfo(3) == "louyang" ) end; atcommand "@autotrade"; end; but still they can use the @autotrade command inside the afk zone.. can you further enlighten me . I just want to disable the @autotrade on my main town which is louyang.
  23. Hello rathena Gonna have a quick request for a Invasion event * No npc * You can add monster and edit the quantity * getitem per kill * Add / Edit map and A special prize for the one who killed the most monster + announce BUMP!
×
×
  • Create New...