Jump to content

AtomikGrafik

Members
  • Posts

    13
  • Joined

  • Last visited

Profile Information

  • Gender
    Female
  • Location
    Canada

Recent Profile Visitors

687 profile views

AtomikGrafik's Achievements

Poring

Poring (1/15)

0

Reputation

  1. Thanks a lot, managed to make everything work! I guess my script is done! Although it still looks kind of clustered, it works well and I'm happy. But WOW! I have learned so much more from this. Joseph, if you can teach me about arrays, I'd be real happy! It's quite a hassle to learn it on my own! You can PM me about it with simple explanations and examples of what arrays can do, that is if you want. I'll still attempt on my own as well. Finished. //======================================================== //TREASURE CHEST MINI-GAME //======================================================== //=====================NPC: Airily====================== prontera,159,186,3 script Airily::air_warp 51,{ set .@tmp_time, gettimestr("%Y%m%d",9); if(#t_1 != .@tmp_time) { set #t_1, gettimestr("%Y%m%d",9); set #t_2, 0; } if(#t_2 > 3) { mes "[Airily]"; mes "I'm sorry, you can only play this event 3 times a day."; close; } else { mes "[Airily]"; mes "Hello, my name is Airily"; mes "and I'm the one in charge of"; mes "the Treasure Chest mini-game."; next; mes "[Airily]"; mes "Ready to play?"; next; switch(select("Yes, please!:I'm not here to play...")) { case 1: mes "[Airily]"; mes "Alright! Let's go!"; close2; set #t_2, #t_2 + 1; setmapflag "poring_w02",mf_nosave; setmapflag "poring_c01",mf_nosave; warp "poring_w02",95,200; end; case 2: mes "[Airily]"; mes "What a bummer..."; close; } } } //======================================================== //TREASURE CHEST MINI-GAME //======================================================== //=======================WAITING ROOM===================== poring_w02,96,200,5 script Airily::air_wait 51,{ end; OnInit: delwaitingroom "Treasure Chest"; waitingroom "Treasure Chest",8,"air_wait::OnWarpToArea",1; end; OnWarpToArea: setmapflag "poring_c01",mf_nomobloot; setmapflag "poring_c01",mf_noskill; warpwaitingpc "poring_c01",104,102; initnpctimer "air_invis"; end; } //======================================================== //TREASURE CHEST MINI-GAME //======================================================== //========================GAME ROOM======================= poring_c01,104,102,0 script Airily::air_invis -1,{ end; OnTCKill: set .@r, 671; setarray .@a, 1,1,2; getitem .@r, .@a[rand(getarraysize(.@a))]; set $TCAmount, $TCAmount - 1; if($TCAmount <= 2) { killmonsterall "poring_c01","air_invis::OnTCKill"; mapannounce "poring_C01","Come play again!",0; areawarp "poring_c01",97,115,119,95,"prontera",158,185; stopnpctimer "air_invis"; detachnpctimer "air_invis"; end; } OnTimer3000: mapannounce "poring_c01","You have 1 minute to destroy the treasure chest of your choice.",0; end; OnTimer8000: mapannounce "poring_c01","If lucky, you can get a pretty nice prize!",0; end; OnTimer13000: mapannounce "poring_c01","Are you ready? Get set! Go!",0; areamonster "poring_c01",109,100,99,90,"Treasure Chest",1348,3,"air_invis::OnTCKill"; end; OnTimer88600: mapannounce "poring_c01","Time's up! Come play again!",0; killmonsterall "poring_c01","air_invis::OnTCKill"; areawarp "poring_c01",97,115,119,95,"prontera",158,185; stopnpctimer "air_invis"; detachnpctimer "air_invis"; end; OnPCLogoutEvent: savepoint "prontera",158,185; if($TCAmount <= 3) { killmonster "poring_c01","air_invis::OnTCKill"; stopnpctimer"air_invis"; detachnpctimer "air_invis"; end; } }
  2. I am not sure if I should post a new topic since I have 3 slight issues with the same script. My first issue is setting up a RID, since warp does not work with this kind of script. I did check the Wiki and read about it but somehow I cannot fully understand when it goes in-depth. Can someone explain to me in a simpler way, with an example on how it works? Unless there is an alternative, please let me know? My second issue is with the monster spawn. The script I have currently works well but it's not really what I am aiming for. My goal is to make 3 treasure chests spawn with each their respective drops (ex. 1 chest drops 2 gold coins, another one drops 1 etc.) and making them spawn randomly on the map. I am not sure if I will need to use arrays for this, which is another thing that I will need to learn eventually. The last issue is if I can set @autoloot on the map. Since the event is timed, it would suck if someone didn't have the time to pick up the drops. I'd rather be safe than sorry. Here is what I have so far in the last part of the script: poring_w02,96,200,5 script Airily::air_wait 51,{ end; OnInit: delwaitingroom "Treasure Chest"; waitingroom "Treasure Chest",8,"air_wait::OnWarpToArea",1; end; OnWarpToArea: warpwaitingpc "poring_c01",104,102; initnpctimer "air_invis"; end; } poring_c01,104,102,0 script Airily::air_invis -1,{ end; OnTCKill: set $TCAmount, $TCAmount - 1; if($TCAmount <= 2) { killmonsterall "poring_c01","air_invis::OnTCKill"; areaannounce "poring_C01",0,0,350,350, "Come play again!",0; stopnpctimer "air_invis"; detachnpctimer "air_invis"; end; } OnTimer3000: areaannounce "poring_c01",0,0,350,350, "You have 1 minute to destroy the treasure chest of your choice.",0; end; OnTimer8000: areaannounce "poring_c01",0,0,350,350, "If lucky, you can get a pretty nice prize!",0; end; OnTimer13000: areaannounce "poring_c01",0,0,350,350, "Are you ready? Get set! Go!",0; areamonster "poring_c01",109,100,99,90,"Treasure Chest",1348,3,"air_invis::OnTCKill"; end; OnTimer88600: areaannounce "poring_c01",0,0,350,350, "Time's up! Come play again!",0; killmonsterall "poring_c01","air_invis::OnTCKill"; warp "SavePoint",0,0; //currently not working since I need to attach the player with RID. stopnpctimer "air_invis"; detachnpctimer "air_invis"; end; } Thanks a lot! It's almost done thanks to Joseph, so far. I'm getting excited!
  3. Oh wow! Talk about a typo I didn't see! Haha! Thanks a lot Joseph!
  4. Hello again. I finally managed to make the limit work by tweaking the script. I also deleted unecessary dialogue to make the script shorter and the game's explanation will be done through NPC broadcast when the player enters the gaming room. Here is my most recent problem, which baffles me since eAthena does not mention of my script having an error whatsoever. My switch function somehow borks up whenever I select the second option of not wanting to play. The window with the dialogue "Do you want to play?" remains after I click "No thanks!" and I have to log off because it gets me stuck. Here is the script prontera,159,186,3 script Airily::air_warp 51,{ set .@tmp_time, gettimestr("%Y%m%d",9); if(#t_1 != .@tmp_time) { set #t_1, gettimestr("%Y%m%d",9); set #t_2, 0; } if(#t_2 > 3) { mes "[Airily]"; mes "I'm sorry, you can only play this event 3 times a day."; close; } else { mes "[Airily]"; mes "Hello, my name is Airily"; mes "and I'm the one in charge of"; mes "the Treasure Chest mini-game."; next; mes "[Airily]"; mes "Do you want to play?"; next; switch(select("Yes, please!::No thanks!")) { case 1: mes "[Airily]"; mes "Alright! Let's go!"; close2; set #t_2, #t_2 + 1; warp "poring_w02",95,200; end; case 2: mes "[Airily]"; mes "Bah!"; close; } } }
  5. Woops, here it is. Thanks a lot for helping me out, I appreciate it. : ) //======================================================== //TREASURE CHEST MINI-GAME //======================================================== //=====================NPC: Hylian======================== prontera,159,186,3 script Hylianne::hyl_warp 51,{ mes "[Hylianne]"; mes "Hello, my name is Hylianne"; mes "and I'm the one in charge of"; mes "the Treasure Chest mini-game."; next; mes "[Hylian]"; mes "Do you want me to explain"; mes "how the mini-game works?"; next; switch(select("Yes, please!::Skip it and go!")) { case 1: mes "[Hylianne]"; mes "You'll have 1 minute to pick"; mes "1 treasure chest out of 3."; next; mes "[Hylianne]"; mes "If lucky, you can end up with"; mes "a really nice prize!"; next; mes "[Hylianne]"; mes "Do you wish to play?"; next; switch(select("Sure!::I'll pass.")) { case 1: break; case 2: mes "[Hylianne]"; mes "You're missing all the fun!"; close; } case 2: break; } if(#t_1 != gettimestr("%Y%m%d",9)) { set #t_1, gettimestr("%Y%m%d",9); set #t_2, 0; } if(#t_2 > 3) { mes "[Hylianne]"; mes "I'm sorry, you can only play this event 3 times a day."; close; } mes "[Hylianne]"; mes "Alright! Let's go!"; close2; set #t_2, #t_2 + 1; warp "poring_w02",95,200; end; } //======================================================== //TREASURE CHEST MINI-GAME //======================================================== //=======================WAITING ROOM===================== poring_w02,96,200,5 script Hylianne::hyl_wait 51,{ end; OnInit: delwaitingroom "Treasure Chest"; waitingroom "Treasure Chest",8,"play_wait::OnWarpToArea",1; end; OnWarpToArea: warpwaitingpc "poring_c01",104,102; end; }
  6. I see, I get it now! Well, I have applied the script but I am getting an error as well as 3 debug. [error]: script: op_2: invalid data for operator C_NE [debug]: data: number value=0 [debug[: string value="20120611" [debug]: source (NPC): Hylianne at prontera (159,186) I still haven't figured out what could be causing this. Any clue?
  7. I'm not sure that I get it... max lenght of what exactly? Sorry if I come off like an idiot, I can be a bit slow in understanding. ^^; Edit: Nevermind, I re-read and it says the max lenght of the string... but what I don't understand is how that is determined?
  8. I figured that Y M D part but what about that number that comes afterward? I have seen in different scripts that is varies (9, 21, 40 etc.). Does it mean anything?
  9. @Joseph: Wow, thank you so much! I will try it out as well as trying to get a better understanding of gettimestr and such. ^^ Oh, silly me, I forgot to ask if someone could give a deeper explanation (while keeping it simple) about gettimestr since it doesn't say much on the wiki. Here is the script I am working on currently and yes, it's as basic as it can get and it's far from completion. What I am trying to do is after a player participated 3 times in the mini-game, is for the NPC to say that the person reached the daily limit. Of course the limit is per account, not per character. Thank you for assisting me. //======================================================== //TREASURE CHEST MINI-GAME //======================================================== //=====================NPC: Hylian======================== prontera,159,186,3 script Hylian::hyl_warp 51,{ mes "[Hylian]"; mes "Hello, my name is Hylian"; mes "and I'm the one in charge of"; mes "the Treasure Chest mini-game."; next; mes "[Hylian]"; mes "Do you want me to explain"; mes "how the mini-game works?"; next; switch(select("Yes, please!::Skip it and go!")) { case 1: mes "[Hylian]"; mes "You'll have 1 minute to pick"; mes "1 treasure chest out of 3."; next; mes "[Hylian]"; mes "If lucky, you can end up with"; mes "a really nice prize!"; next; mes "[Hylian]"; mes "Do you wish to play?"; switch(select("Sure!::I'll pass.")) { case 1: mes "[Hylian]"; mes "Let's go!"; warp "poring_w02",95,200; end; case 2: mes "[Hylian]"; mes "You're missing all the fun!"; close; } case 2: mes "[Hylian]"; mes "Alright!"; warp "poring_w02",95,200; end; } } //======================================================== //TREASURE CHEST MINI-GAME //======================================================== //=======================WAITING ROOM===================== poring_w02,96,200,5 script Hylian::hyl_wait 51,{ end; OnInit: delwaitingroom "Treasure Chest"; waitingroom "Treasure Chest",8,"play_wait::OnWarpToArea",1; end; OnWarpToArea: warpwaitingpc "poring_c01",104,102; end; }
  10. @Snow: In the scripts_custom.conf correct? Yes I have removed the path and saved the file so that the path is permanently removed.
  11. After my first post, I noticed that my error is not really affecting my script upload, which I am relieved. Anyways, I have a questions. I am working on a mini-game script and I was wondering if it was feasable to put an account based limit on how many times a player can acess and play the mini-game? I was thinking 3 times a day. Thanks a lot!
  12. Yes, I rebooted the server but the error still comes up.
  13. Hello, I am new to the forums but I have been doing basic scripting for awhile, mostly as a hobby for now. Here is my problem and hope to find the solution with the Community's help: I have recently deleted 2 .txt scripts respectively named "novice_quest.txt" and "poring_blaster.txt" that was in my own made folder named "testnpc". I also removed the custom scripts in script_custom.conf. For some odd reason, after re-launching eAthena, I get this error: npc_parsesrcfile: File not found 'npc/testnpc/novice_quest.txt'. I have deleted the folder to see if it would fix that problem but it didn't do anything. I don't recall having placed the script anywhere else. Is there a solution to remedy this problem? I believe it's not allowing me to put up new scripts and it is quite a hassle. Thank you.
×
×
  • Create New...