Jump to content

Skorm

Forum Moderator
  • Posts

    1,238
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by Skorm

  1. I'm not sure I'll test it out tomorrow and let you know.
  2. Thanks for reuploading some extremely useful files.
  3. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6259 Make an npc with the OnInit: Tag and use that command or just add it in the database.
  4. @crazyarashi Not sure if you suggested this one, but it's something I've been wanting for awhile, and it looks like @Capuche just added it. In anycase it would be much better to update your server and use the killedgid variable instead of all this mumbo jumbo. https://github.com/rathena/rathena/commit/c856b07c45aed6c5842ee19a940f7e76f780221c
  5. Here there might be a better way of doing this but this is the method I've come up with tested and it's working quite well. prontera,260,69,1 script monsterspawner 100,{ OnMinionSummon: [email protected]_id = 1002; [email protected]_count = 10; monster "prontera",255,55,"Pink Evil Minions",[email protected]_id,[email protected]_count,strnpcinfo(0)+"::OnMinionKill"; copyarray .gid[getarraysize(.gid)], [email protected][0], [email protected]_count; end; OnMinionKill: [email protected] = getarraysize(.gid); for([email protected] = 0; [email protected] < [email protected]; [email protected]++) { if(unitexists(.gid[[email protected]])) { getunitdata(.gid[[email protected]],[email protected]); if([email protected][UMOB_HP]) { dispbottom [email protected][UMOB_X]+" "[email protected][UMOB_Y]+" HP:"[email protected][UMOB_HP]; deletearray .gid[[email protected]], 1; break; } } else { deletearray .gid[[email protected]], 1; [email protected]; } } }
  6. I can confirm the script will not work with eAthena servers because it uses the addrid extensively but I'm pretty sure rAmod has the addrid command so it should work. If it doesn't and you purchase the script I will make an rAmod compatible version. If there is interest in an eAthena version I will make that too.
  7. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6843
  8. It looks like there is a hidden character between 0 and ) after gettimetick just open it in any text editor and retype that part.
  9. autobonus2 "{ if( Hp <= MaxHp * 5 / 10 && @item_cooldown <= gettimetick(0) ){ set @item_cooldown, gettimetick(0) + 300000; percentheal 100,0; sc_start SC_KYRIE,6000000,10; } }",1000,1,BF_SHORT|BF_LONG,"{ specialeffect2 EF_FIRESPLASHHIT; }"; I had to use temporary character variables for the cooldown as the effect is triggered 100% of the time but with the condition that the players hp <= 50% of maxhp. So it is triggered but not activated. What this means is the cooldown will persist even after the player dies.
  10. Wrong section. Moved to "Scripting Support". @neXus addrid(4,0,36,63,63,36); for (set [email protected],0; [email protected] < getarraysize(.prize); [email protected]++ ){ getitem .prize[[email protected]],.prize[[email protected]]; } announce .npcName$ + " : We have a winner. "+ strcharinfo(0) +" wins the death by dice event round "+ .diceRound +".",0; detachrid; if (.consolation){ addrid(1); for (set [email protected],0; [email protected] < getarraysize(.consolation); [email protected]++ ){ getitem .consolation[[email protected]],.consolation[[email protected]]; } detachrid; } if(.length != 0) end; .length++; sleep 5000; announce "Thank you for playing..."; .length = 0; Winner will still be announced multiple times. I'm not sure if that's what you wanted but "Thank you for playing..." will only be announced once this way. Addrid starts a new instance of the npc for each player added to it given by the parameters. Detaching a player does not stop that instance of the script from running.
  11. Most of it looks good to me I changed the way some things were formatted but honestly that's probably just my preference. Other than that when you have next; in the message you sent to the player about the server being in maintenance mode actually allows them to bypass the @kick command by having @go or something mapped to and alt+[1-0] key. I've found plenty of scripts with this flaw. I believe sleep2 will persist even if they warp. If that doesn't work use addtimer <ticks>,"NPC::OnLabel"; prontera,150,150,4 script Server Maintenance 73,{ /***********************************/ /**/.npc$ = "[Server Maintenance]"; /**/.gm = 99; //Level GM /**/.user$ = "root"; //root /**/.password = 12345; //Password /**********************************/ mes .npc$; if(getgmlevel() >= .gm) { mes "Hello"+ strcharinfo(0) +"."; mes "Please enter the username:"; next; input [email protected]$; mes .npc$; mes "Please enter password"; next; input [email protected]; mes .npc$; if( [email protected]$ == .user$ && [email protected] == .password ) { mes "Do you want to activate the server in maintenance mode?"; next; switch(select("Yes:No:Reset Server")) { mes .npc$; case 1: initnpctimer; mes "Server in maintenance mode ^00ff7fenabled^000000"; announce "The server will be temporarily closed for maintenance -- from 5 minutes",bc_all|bc_npc; break; case 2: mes "Bye"; break; case 3: set $srv_mnt$,"OFF"; mes "Reset"; break; } } else mes "There was a problem with your login information!"; } else mes "Sorry but you don't have a permission"; close; OnTimer60000: // 1min. announce "The server will be temporarily closed for maintenance -- from 4 minutes",bc_all|bc_npc; end; OnTimer120000: // 2min. announce "The server will be temporarily closed for maintenance -- from 3 minutes",bc_all|bc_npc; end; OnTimer180000: // 3min. announce "The server will be temporarily closed for maintenance -- from 2 minutes",bc_all|bc_npc; end; OnTimer240000: // 4min. announce "The server will be temporarily closed for maintenance -- from 1 minutes",bc_all|bc_npc; end; OnTimer330000: announce "-- Server Shutdown in 30 seconds --",bc_all|bc_npc; end; OnTimer430000: announce "-- Server Shutdown in 20 seconds --",bc_all|bc_npc; end; OnTimer540000: announce "-- Server Shutdown in 10 seconds --",bc_all|bc_npc; end; OnTimer655000: announce "-- We will be back soon. Bye bye --",bc_all|bc_npc; set $srv_mnt$,"ON"; stopnpctimer; sleep2 5000; atcommand "@kickall"; end; } - script ServerMaintenance -1,{ OnPCLoginEvent: if($srv_mnt$ == "ON") { if(getgmlevel() >= 99) { mes "Hello "+ strcharinfo(0) +"."; mes "The server is "+ $srv_mnt$ +" mode"; close; } mes "[^55aaffLeoRO Server^000000]"; mes "Sorry but the server is temporarily out of service,"; mes "for maintenance."; mes "Please try again later!"; sleep2(5000); atcommand "@kick " + strcharinfo(0); } end; } You can look through what I've changed and maybe someone else has some ideas. In terms of improvements to the overall script. You could add multiple logins or something.
  12. The links worked fine for me. Here's a mirror anyways. Ghost WAV Files [Mirror]
  13. @Akkarin Bh-but what about waffle time?! There's always time for waffle time.
  14. @aadritch2 It looks like delitem3 would work, but as for using the unique id to delete items there isn't a command for that. You could remove it via SQL and kick the player, but they would need to go back to login screen and could create problems.
  15. My interpretation of OP's request is that you can kill any of the 5 monsters and it will count. Not just a single monster at a time which is what this script does. Also OP wanted item requirements.
  16. It looks like in his example the NPC assigns one monster to kill at random from the list. Instead of looping through it which is what OP asked... In other words, @AnnieRuru, u right. Also it's good to see you more active again and junk.
  17. Skorm

    @noheadgear

    I don't think something like this can be done with scripts alone at least. This might be like a client / source mod. Gunna move it over there.
  18. @IvanD Please articulate your question. Edit: After reading the topic again. I think he's maybe asking for a player owned npc shop and when one player purchases an item from the shop. The owner gets an item too? Or something along those lines.
  19. I'm pretty sure for that you would need a dynamic shop npc. https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ea-addicts/Daily TCG Shop.txt I made a script similar to this (forever ago) except the items for sale rotate daily. Although stock gets reset when the server restarts.
  20. @ZelosAvalon I updated my previous post. This isn't the entire event though. It's just a way of collecting 10 different players in a list and then warping them in groups of two to different maps. You'll have to figure out the rest unless someone else wants to spend the time building you an event.
  21. I don't really have a lot of time to code it all out or whatever... Or even test but this is a quick example I came up with. prontera,163,187,6 script dual warp 100,{ [email protected] = getarraysize(.waiting_list$); if( !.init && !compare("|"+implode(.waiting_list$,"|")+"|", "|"+getcharid(0)+"|") ) { .waiting_list$[[email protected]] = ""+getcharid(0); [email protected]++; npctalk [email protected] + ""; if( [email protected] == 10 ) { .init = 1; [email protected]_len = getarraysize(.maps$); copyarray [email protected]$,.maps$,[email protected]_len; copyarray [email protected],.cordx,[email protected]_len; copyarray [email protected],.cordy,[email protected]_len; while( [email protected] ) { [email protected] = rand([email protected]); [email protected]_rng = [email protected] % [email protected]_len; [email protected]$ = [email protected]$[ [email protected]_rng ]; [email protected] = [email protected][ [email protected]_rng ]; [email protected] = [email protected][ [email protected]_rng ]; warp [email protected]$,[email protected],[email protected],atoi(.waiting_list$[[email protected]]); deletearray .waiting_list$[[email protected]], 1; [email protected]; [email protected] = rand([email protected]); warp [email protected]$,[email protected],[email protected],atoi(.waiting_list$[[email protected]]); deletearray .waiting_list$[[email protected]], 1; deletearray [email protected]$[ [email protected]_rng ], 1; deletearray [email protected][ [email protected]_rng ], 1; deletearray [email protected][ [email protected]_rng ], 1; [email protected]_len--; [email protected]; } .init = 0; } } end; OnInit: setarray .maps$, "prontera", "izlude", "geffen", "comodo", "amatsu"; setarray .cordx, 10, 100, 50, 20, 40; setarray .cordy, 10, 100, 50, 20, 40; }
  22. @Balfear It's what I've come to expect and that's not a bad thing.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.