Jump to content

Mabuhay

Members
  • Posts

    446
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by Mabuhay

  1. As title says, can someone make a script where it gives random items to players who kills monster only in a certain map like prt_fild08 with a chance of 20%. sample items 607 608 609 610. Thanks EDIT: I ended up making it myself, how is this? Not tested because im currently not home. - script test -1,{ OnNPCKillEvent: getmapxy (.@map$, .@x, .@y, 0); set .@t_maps$[0],"prt_fild08","prt_fild09"; set .@t_reward$[0],607,608; for (set .@a, 0; .@a < getarraysize(.@t_maps$); set .@a, .@a + 1) { if( .@map$ == .@t_maps$[.@a]) { getitem getarraysize(.@t_reward$),1; end; } } }
  2. ohh sorry, i kinda didnt realize that. still learning on how to script though. thanks Capuche! EDIT: Now, having this error: Lol seriously sorry for being so noob.
  3. Thanks for your response Capuche! I've tested it out and it seems to have some problems. Here is how i modified it: function script randbox { getitem 32020,1; mes "Do you really want to open one(1) Lottery Box?"; mes "^FF0000NOTE: Dont press cancel(beside OK) or the box will be gone.^000000"; mes "No refund will be given if you do so."; //next; if ( select("Yes Please:No! Not yet!") == 2 ) close; // setarray .@box1, "chance", item id, amount... setarray .@box1, 5, 32008,1, 32009,1, 32010,1, 32011,1, 32012,1, 32013,1, 32025,3; setarray .@box2, 15,32021,60, 32022,60, 8403,8, 8402,20, 607,25, 8400,10; setarray .@box3, 20,32007,1, 32006,1, 32005,1, 32004,1, 32003,1, 32002,1, 608,35, 985,15, 8404,3; setarray .@box4, 25,32025,1, 6553,1, 6564,1, 6565,1, 6566,1, 8524,1, 8506,1, 8501,1; setarray .@box5, 30,32023,40, 32024,40, 610,10, 607,10, 984,15; setarray .@box6, 50,32001,1, 32000,1; setarray .@box7, 60,32023,20, 32024,20, 608,10, 32021,30, 32022,30; // etc.. delitem 32020,1; set .@r, rand(100); while( .@r >= getd( ".@box"+ .@i ) ) .@i++; .@rand_index = rand( ( getarraysize( getd( ".@box"+ .@i ) ) -1 )/2 ) *2 -1; getitem getd( ".@box"+ .@i +"["+ .@rand_index +"]" ), getd( ".@box"+ .@i +"["+ (.@rand_index +1) +"]" ); emotion e_grat,1; close; } Here is the problem: I get stuck with that (in picture) some time then wont give item.
  4. function script randbox { mes "Do you really want to open one(1) Lottery Box?"; mes "^FF0000NOTE: Dont press cancel(beside OK) or the box will be gone.^000000"; mes "No refund will be given if you do so."; //next; switch(select("Yes Please:No! Not yet!")) { case 1: set .@r, rand(100); //if( .@r >= 0 && .@r < 2) { // switch( rand(1) ) { // case 0: getitem 32025,1; break; // } //} if( .@r >= 1 && .@r < 5 ) { switch( rand(1,6) ) { case 1: getitem 32008,1; break; case 2: getitem 32009,1; break; case 3: getitem 32010,1; break; case 4: getitem 32011,1; break; case 5: getitem 32012,1; break; case 6: getitem 32013,1; break; } } if( .@r >= 6 && .@r < 10 ) { switch( rand(1,9) ) { case 1: getitem 32025,1; break; case 2: getitem 8400,2; break; case 3: getitem 8403,2; break; case 4: getitem 8402,6; break; case 5: getitem 607,25; break; case 6: getitem 8400,10; break; case 7: getitem 8402,20; break; case 8: getitem 8403,8; break; case 9: getitem 32025,3; break; } } if( .@r >= 11 && .@r < 20 ) { switch( rand(1,6) ) { case 1: getitem 32007,1; break; case 2: getitem 32006,1; break; case 3: getitem 32005,1; break; case 4: getitem 32004,1; break; case 5: getitem 32003,1; break; case 6: getitem 32002,1; break; } } if( .@r >= 21 && .@r < 35 ) { switch( rand(1,12) ) { case 1: getitem 32021,60; break; case 2: getitem 32022,60; break; case 3: getitem 8404,rand(2,3); break; case 4: getitem 32025,1; break; case 5: getitem 6553,1; break; case 6: getitem 6564,1; break; case 7: getitem 6565,1; break; case 8: getitem 6566,1; break; case 9: getitem 8524,1; break; case 10: getitem 8506,1; break; case 11: getitem 8501,1; break; case 12: getitem 608,35; break; } } if( .@r >= 36 && .@r < 47 ) { switch( rand(1,4) ) { case 1: getitem 32023,40; break; case 2: getitem 32024,40; break; case 3: getitem 984,15; break; case 4: getitem 985,15; break; } } if( .@r >= 48 && .@r < 60 ) { switch( rand(1,5) ) { case 1: getitem 32001,1; break; case 2: getitem 32000,1; break; case 3: getitem 608,15; break; case 4: getitem 607,10; break; case 5: getitem 610,10; break; } } if( .@r >= 61 && .@r < 79 ) { switch( rand(1,2) ) { case 1: getitem 32023,20; break; case 2: getitem 32024,20; break; } } if( .@r >= 81 && .@r < 100 ) { switch( rand(1,2) ) { case 1: getitem 32021,30; break; case 2: getitem 32022,30; break; } } emotion e_grat,1; close; case 2: getitem 32020,1; close; } //close; }My problem here is that sometimes, when the box is opened, no items will be given. The goal of this script is to give items randomly with certain percentage. I was trying to conceptualize and make the script but this is all i can think of. If you have better version of this, please dont hesitate to edit this. Waiting for reply. Thank you!
  5. yes, make sure you put the password of encryption though if you're using neoncube..as what i know..
  6. That's how you do it. Discount skill does not affect the price. and lastly, you cant just change that...
  7. You should use the search engine next time. http://rathena.org/board/files/file/2504-multi-currency-shop/
  8. Thanks Stolao. I'll be testing this now. I noted your point and i will optimize this my own, thanks again
  9. I tried to search every hourly points in the forum but i cant find the one that suits my needs. Here are my request: -- crossed out means done -- bold ones needs to be done *Timer starts when player is online. *Timer still continues even the player is idle or in chatting. *Timer stops when player will vend (@at) *Timer stops when player logs out. *Timer will start again, from where it stopped, upon re-logging. (if possible) *Gives cashpoints on these hours of being online: Hour 1 = 100 Cashpoints Hour 2 = 200 Cashpoints Hour 4 = 400 Cashpoints // Yes, I skipped hour 3 on purpose. No reward in hour 3 Hour 8 = 1300 Cashpoints // And so hour 5 ~ 7 will give no reward Then timer stops *Total of 2000 Cashpoints limit per day. *After the next day in the server, the timer resets. Thank you! Here is a script I found and modify: //===== Hourly Points Script ========================================= //===== By: ========================================================== //= GorthexTiger modified by Nibi //===== Current Version: ============================================= //= 1.0 //===== Compatible With: ============================================= //= Any eAthena Version //===== Description: ================================================= //= Get Points every successful hours of gameplay, you cannot get //= the points even if you miss a second or a minute. A player will //= get a very big bonus if they played 12 hours consecutively //= or without logging out of the game. If the player is vending //= the script will then stop. //===== Additional Comments: ========================================= //= You can modify the script to your liking. //= The default points is Kafrapoints change it anyway if you like. //= 1.1 = Check Chatting too //= 1.2 = 5 Minute Idle Check & @at/@autotrade check. //= 1.3 = Corrected the current balance line on 12 Hours Consecutive //==================================================================== - script hourlypoints -1,{ //--Start of the Script OnPCLoginEvent: attachnpctimer ""+strcharinfo(0)+""; initnpctimer; end; OnTimer500: //Check if Vending (normal or @at) if(checkvending() >= 1) { dispbottom "The hourly points event stopped because you were vending. Please relog if you wish to start again."; stopnpctimer; end; } OnTimer600000: set @minute, @minute + 1; //Check for 1 Minute if(@minute == 6000){ //set @minute,0; set .@point_amt, 100; //Points to get every hour (default: 10) set #CASHPOINTS, #CASHPOINTS + .@point_amt; dispbottom "You received "+.@point_amt+" Cashpoints by staying ingame for 1 hour"; dispbottom "Current Balance = "+#CASHPOINTS+" Cashpoints"; //set @consecutive_hour, @consecutive_hour + 10; } if(@minute == 12000){ //set @minute,0; set .@point_amt, 200; //Points to get every hour (default: 10) set #CASHPOINTS, #CASHPOINTS + .@point_amt; dispbottom "You received "+.@point_amt+" Cashpoints by staying ingame for 2 hour"; dispbottom "Current Balance = "+#CASHPOINTS+" Cashpoints"; //set @consecutive_hour, @consecutive_hour + 10; } if(@minute == 24000){ //set @minute,0; set .@point_amt, 400; //Points to get every hour (default: 10) set #CASHPOINTS, #CASHPOINTS + .@point_amt; dispbottom "You received "+.@point_amt+" Cashpoints by staying ingame for 4 hour"; dispbottom "Current Balance = "+#CASHPOINTS+" Cashpoints"; //set @consecutive_hour, @consecutive_hour + 10; } if(@minute == 48000){ set @minute,0; set .@point_amt, 1300; //Points to get every hour (default: 10) set #CASHPOINTS, #CASHPOINTS + .@point_amt; dispbottom "You received "+.@point_amt+" Cashpoints by staying ingame for 8 hour"; dispbottom "Current Balance = "+#CASHPOINTS+" Cashpoints"; //set @consecutive_hour, @consecutive_hour + 10; } //Check for 12 hours consecutive // if(@consecutive_hour == 12) { // set @consecutive_hour,0; // set .@cpoint_amt, 100; //Points to get for 12 Consecutive hours (default: 100) // set #CASHPOINTS, #CASHPOINTS + .@cpoint_amt; // dispbottom "You receive "+.@cpoint_amt+" Cashpoints in playing for 12 consecutive hours"; // dispbottom "Current Balance = "+#CASHPOINTS+" Cashpoints"; } stopnpctimer; initnpctimer; end; } //--End of the Script
  10. No, sorry by that. What i meant is that you can access the NPC Anywhere in the server by a command. But the same time, the NPC also exist in server.
  11. I want to call an NPC using bindatcommand function. Example NPC 1. when i type @npc1, i can access the NPC1 but NPC1 also exist in map.
  12. EDP Modification: Effect: 1.) 1%hp reduction per second 2.) Cant use healing pots help please
  13. The slow is not working. How to fix it? ADD: Enable use of skill when using G.Field
  14. Instead of caster Matk - target def, it will be 100% Matk - target def. basically increasing the dmg output 2x. Help please and thanks Done
  15. Add this in your item_db2 The line in bold and red is the code. If the player uses this item, he will receive 100 cash points.
  16. Solved it by myself. Thanks anyways. I used some codes I read in multiple scripts and put them together.
  17. Here is Emisty's Stage game: guild_vs5,50,50,5 script Stage Game 437,{ // Monster ID / Amount Initiating ( Check db/Mob_db.txt || db/Mob_db2.txt ) setarray .Stage[0], 1001,10, // Stage 1 + Amount 1002,12, // Stage 2 + Amount 1004,14, // Stage 3 + Amount 1005,16, // Stage 4 + Amount 1007,18, // etc...... 1008,20, // 1058,30; // Final Stage ( Max. ~64 Rounds ) // Reward ID / Amount Initiating ( Check db/Item_db.txt || db/Item_db2.txt ) setarray .Reward[0], 607,10, // Reward 1 + Amount 608,5, // Reward 2 + Amount 501,3, // etc...... 512,1; // Last Reward 1 ( Max. ~64 Items ) // MapFlags Initiating ( Check db/Cont.txt ) setarray .MapFlags[0],0,1,2,3,4,5,11,13,14,15,22,29,30,31,32,33,34,35,38,41,43,44,47,49; for( set .@mf,0; .@mf < getarraysize( .MapFlags ); set .@mf,.@mf + 1 ) { setmapflag strcharinfo(3),.MapFlags[.@mf]; } if( mobcount( strcharinfo(3),"all" ) > 0 || .Level > 0) { dispbottom "Just Kill All the Monster to Win the Game..."; end; } set .Level,0; announce "[Level "+( (.Level/2)+1 )+"] : [ "+.Stage[.Level+1]+" x "+getmonsterinfo( .Stage[.Level],0)+" ]",bc_all,0x37FDFC; monster strcharinfo(3),0,0,"[Slave] "+getmonsterinfo( .Stage[.Level],0)+"",.Stage[.Level],.Stage[.Level+1],strnpcinfo(0)+"::OnMobKill"; delwaitingroom; waitingroom "Left ["+mobcount( strcharinfo(3),strnpcinfo(0)+"::OnMobKill" )+"] Monster",0; end; OnMobKill: delwaitingroom; if( mobcount( strcharinfo(3),strnpcinfo(0)+"::OnMobKill" ) == 0 && .Level < ( getarraysize( .Stage ) - 5 ) ) { set .Level,.Level + 2; waitingroom "["+((( getarraysize( .Stage )/2 ) - .Level/2) - 1)+"] Rounds to Go.",0; for( set .@t,5; .@t > 0; set .@t,.@t - 1 ) { announce "[Level "+( (.Level/2)+1 )+"] in "+.@t+" Seconds",bc_map,0x4EEE94,0,35; sleep2 1000; } announce "[Level "+( (.Level/2)+1 )+"] : [ "+.Stage[.Level+1]+" x "+getmonsterinfo( .Stage[.Level],0)+" ]",bc_all,0x37FDFC; monster strcharinfo(3),0,0,"[Slave] "+getmonsterinfo( .Stage[.Level],0)+"",.Stage[.Level],.Stage[.Level+1],strnpcinfo(0)+"::OnMobKill"; } if( mobcount( strcharinfo(3),strnpcinfo(0)+"::OnMobKill" ) == 0 && .Level >= ( getarraysize( .Stage ) - 5 ) ) { set .Level,.Level + 2; announce "BOSS Stage",bc_map,0xFF0000,0,90; specialeffect 563; sleep2 2000; for( set .@t,5; .@t > 0; set .@t,.@t - 1 ) { specialeffect 563; announce "BOSS STAGE in "+.@t+" Seconds",bc_map,0xFF0000,0,60; sleep2 1000; } announce "[Level "+( (.Level/2)+1 )+"] : [ "+.Stage[.Level+1]+" x "+getmonsterinfo( .Stage[.Level],0)+" ]",bc_all,0x37FDFC; monster strcharinfo(3),0,0,"[BOSS] "+getmonsterinfo( .Stage[.Level],0)+"",.Stage[.Level],.Stage[.Level+1],strnpcinfo(0)+"::OnBossKill"; } delwaitingroom; waitingroom "Left ["+mobcount( strcharinfo(3),strnpcinfo(0)+"::On"+( ( .Level-2 ) > ( getarraysize( .Stage ) - 5 ) ? "BossKill":"MobKill") )+"] Monster",0; end; OnBossKill: delwaitingroom; if( mobcount( strcharinfo(3),strnpcinfo(0)+"::OnBossKill" ) > 0 ) { waitingroom "Left ["+mobcount( strcharinfo(3),strnpcinfo(0)+"::OnBossKill")+"] Monster",0; end; }else{ delwaitingroom; waitingroom "REWARD TIME",0; specialeffect 709; announce "Congratulation to Team [ "+getpartyname( getcharid(1) )+" ] who had just finished the Stage Game. ",0; getpartymember getcharid(1),1; getpartymember getcharid(1),2; set @Location$,strcharinfo(3); for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ) { if ( isloggedin($@partymemberaid[.@i]) ) { attachrid $@partymemberaid[.@i]; if( strcharinfo(3) == @Location$ ) { unittalk getcharid(3),"Yeehaaa !! We Beat ALL the Monster !!!"; unitemote getcharid(3),e_heh; specialeffect2 709; for( set .@a,0; .@a < getarraysize( .Reward ); set .@a,.@a + 2 ) getitem .Reward[.@a],.Reward[.@a+1], $@partymemberaid[.@i]; dispbottom "Gained those items as Reward for Finishing Stage Game"; } } } sleep2 5000; mapwarp strcharinfo(3),"prontera",155,180; set .Level,0; delwaitingroom; } OnInit: waitingroom "Click Me",0; end; } prontera,146,188,5 script Stage Game#Register 794,{ while(1){ mes "Hello, i am ^FF0000Stage Game Manager^000000. How can i help you ?"; mes "^0000FFRegistration Status^000000 : "+( getmapusers(.Map$) > 0 ?"^FF0000OFF":"^00FF00ON")+"^000000"; mes "(^FF0000Only Leader can Register^000000)"; mes ""; mes "It is In ^FF0000BETA Test^000000."; next; switch(select("^00FF00Stage Game Information^000000", ( getmapusers(.Map$) > 0 || getcharid(0) != getpartyleader( getcharid(1),2 ) )?"":"^0000FFRegister for Stage Game^000000", ( getmapusers(.Map$) < 1 || getgmlevel() < 60 )?"":"^FF0000Reset Stage Game^000000")) { Case 1: mes "^FF0000Stage Game^000000 is a small game that have alot of monster to be kill from round to round."; mes "With every increase or round you manage to reach, the monster could be stronger than before."; next; mes "You could win up some ^0000FFUnique^000000 prize upon you finished the whole ^FF0000Stage Game^000000"; next; mes "In order to ^0000FFRegister^000000 for ^FF0000Stage Game^000000, all your party member must meet the ^0000FFRequirements^000000"; next; mes "[ ^00FF00Requirements^000000 ]"; mes "^0000FFBase Level^000000 : "+.Level+" Level"; mes "^0000FFZeny^000000 : "+.Zeny+" Zeny "; mes "^0000FFParty Members^000000 : "+.PartyMember+" Members"; mes "(^FF0000Level / Zeny only Applied on Leader ^000000 )"; next; break; Case 2: // if( getgmlevel() < 80 ){ // mes "Stage Game is under Debugging Development. Simple Game but Hard "; // close; // } getpartymember getcharid(1),1; getpartymember getcharid(1),2; set @Count,0; for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ){ if ( isloggedin($@partymemberaid[.@i]) ){ set @Count,@Count+1; } } if( @Count < .PartyMember || BaseLevel < .Level || Zeny < .Zeny ){ mes "[ ^00FF00Requirements^000000 ]"; mes "^0000FFBase Level^000000 : "+.Level+" Level"; mes "^0000FFZeny^000000 : "+.Zeny+" Zeny "; mes "^0000FFParty Members^000000 : "+.PartyMember+" Members"; mes "(^FF0000Level / Zeny only Applied on Leader ^000000 )"; close; }else{ set Zeny, Zeny - .Zeny; mes "Your party will now be warped into the Destination to start the Game."; dispbottom "Click on the NPC inside to start the game."; delwaitingroom "Stage Game"; close2; announce "Team [ "+getpartyname( getcharid(1) )+"] has joined STAGE GAME.",0; warpparty .Map$,0,0,getcharid(1); killmonster .Map$,"All"; set getvariableofnpc(.Level,"Stage Game"),0; end; } Case 3: mes "The Game has been Reset."; killmonster .Map$,"All"; mapwarp .Map$,"prontera",155,180; announce "A GM has RESET the Stage Game, Sorry for the Incovenience.",0; set getvariableofnpc(.Level,"Stage Game"),0; delwaitingroom "Stage Game"; next; break; } } close; OnInit: waitingroom "NULL",0; OnWhisperGlobal: set .Level,1; set .Zeny,0; set .PartyMember,1; set .Map$,"guild_vs5"; while(sleep2(1000)) { delwaitingroom; waitingroom ( getmapusers(.Map$) > 0 ? " NOT":" " )+" Available",0; } end; } Need a little modification regarding the reward system, i want it to be distributed to all party members and not only to the party leader alone. Thanks in advance!
  18. How to I change these to DP? tried replacing everything in msgstringtable.txt but none changes these.
  19. im using one but i need the one with coutdown timer pub
  20. if possible, one that can be configured in-game.
  21. yes, im in to it right now. its a good thing i had a back up of my server.
  22. Not sure if im in the right section but i keep on having this error. Last thing i did as i can remember is that i change the Max EventQueue in Map.h to 5. Then in my CTF script, i added this "sc_start SC_SLOWDOWN,180000,1;" and some "sc_end SC_SLOWDOWN;" to end it. after which, i keep on having these errors. I cant open 2 clients because of this. if i try to open a new client, the 2nd client lags and that errors shows in my map_server therefore forcing me to close my 2nd client opened
×
×
  • Create New...