Jump to content

Skorm

Forum Moderator
  • Posts

    1268
  • Joined

  • Last visited

  • Days Won

    33

Everything posted by Skorm

  1. In your item database the last two script sections are for equip and unequip... In both items add something like this two the equip script. if(isequipped(1599)) unequip(EQI_SHOES); Anyways that's all I'm saying.
  2. Skorm

    Hi All

    Hmm that's kinda neat. Welcome.
  3. Get the mob ids. Get the NPC coordinates. Get the maps that you want to use for this event (do /where we need that map name). Create the mobs in your mod_db and post the entries. Just because you post in the script request section doesn't mean we're going to do everything for it. These are some simple things you can do to improve the odds of your request being completed.
  4. You could re-purpose my woe waiting groom timer script. http://upaste.me/a34345394862f242d I might try to make a function for this at some point!
  5. To Annie's post above she actually told me not to do this when I did it like 4 years ago... What the heck and she doesn't even credit me here for maybe giving her some kind of subliminal inspiration whatever... :< [Source] Hurry before she changes it. /gg Anyways I just wanted to post a neat function I came up with for anybody who might want to use it. DisplayPages Function: Basically, it takes a bunch of options that you want to put into a menu and adds pages so the players can move through them easily. ///This function takes an array of strings and builds a menu players can navigate. ///Usage: DisplayPages(.@string_array${, .@page_size }); ///Output: This function returns the selected item index from the given array. function script DisplayPages { .@page_size = getarg(1, 10); .@len = getarraysize(getarg(0)); .@pages = .@len / .@page_size; .@pages -= .@len > .@page_size && .@len % .@page_size ? 0 : 1; do { copyarray .@copy$[0], getelementofarray(getarg(0), .@page_size * .@page), .@page_size; if( .@page < .@pages ) .@copy$[.@page_size] = "Next Page =>"; if( .@page > 0 ) .@copy$[.@page_size +1] = "<= Previous Page"; .@menu = select(implode(.@copy$,":")); if( .@menu == .@page_size +1 ) .@page++; else if( .@menu == .@page_size +2 ) .@page--; deletearray .@copy$; } while( .@menu > .@page_size ); .@menu += .@page_size * .@page; return .@menu-1; } Example NPC: prontera,146,188,4 script Warper 97,{ mes "[Warper]"; mes "Select the map you want to warp to."; next; setarray .@maps$, "prontera", "morocc", "payon", "geffen", "izlude", "jawaii", "dewata", "eclage", "moscovia", "ayothaya", "lighthalzen", "alberta", "aldebaran", "xmas", "comodo", "hugel", "rachel", "veins", "pvp_n_1-5", "pvp_n_1-4"; .@selection = DisplayPages(.@maps$, 5); warp .@maps$[.@selection], 0, 0; end; }
  6. I'm not sure I'll test it out tomorrow and let you know.
  7. Thanks for reuploading some extremely useful files.
  8. 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.
  9. @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
  10. 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: .@minion_id = 1002; .@minion_count = 10; monster "prontera",255,55,"Pink Evil Minions",.@minion_id,.@minion_count,strnpcinfo(0)+"::OnMinionKill"; copyarray .gid[getarraysize(.gid)], $@mobid[0], .@minion_count; end; OnMinionKill: .@len = getarraysize(.gid); for(.@a = 0; .@a < .@len; .@a++) { if(unitexists(.gid[.@a])) { getunitdata(.gid[.@a],.@mobdata); if(!.@mobdata[UMOB_HP]) { dispbottom .@mobdata[UMOB_X]+" "+.@mobdata[UMOB_Y]+" HP:"+.@mobdata[UMOB_HP]; deletearray .gid[.@a], 1; break; } } else { deletearray .gid[.@a], 1; .@len--; } } }
  11. 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.
  12. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L6843
  13. It looks like there is a hidden character between 0 and ) after gettimetick just open it in any text editor and retype that part.
  14. 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.
  15. Wrong section. Moved to "Scripting Support". @neXus addrid(4,0,36,63,63,36); for (set .@i,0; .@i < getarraysize(.prize); .@i++ ){ getitem .prize[.@i],.prize[.@i]; } announce .npcName$ + " : We have a winner. "+ strcharinfo(0) +" wins the death by dice event round "+ .diceRound +".",0; detachrid; if (.consolation){ addrid(1); for (set .@t,0; .@t < getarraysize(.consolation); .@t++ ){ getitem .consolation[.@t],.consolation[.@t]; } 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.
  16. 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 .@usr$; mes .npc$; mes "Please enter password"; next; input .@psw; mes .npc$; if( .@usr$ == .user$ && .@psw == .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.
  17. The links worked fine for me. Here's a mirror anyways. Ghost WAV Files [Mirror]
  18. @Akkarin Bh-but what about waffle time?! There's always time for waffle time.
  19. @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.
  20. 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.
  21. 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.
×
×
  • Create New...