Jump to content

Skorm

Forum Moderator
  • Posts

    1,238
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by Skorm

  1. Skorm

    Investor

    For an MMO RO's PvP system is amazing. Also I think there is something to be said about the responsiveness and perspective RO provides. You've got what feels like almost frame perfect control of your character on a good server.
  2. Skorm

    Guild Package.

    I cannot be bothered to test this but I'm pretty sure... At line 983 would do the trick. if(sd != NULL && sd->status.guild_id == guild_id) { // do stuff that needs the guild_id first, BEFORE we wipe it npc_event_doall_id("OnLeaveGuild", account_id); if (sd->state.storage_flag == 2) //Close the guild storage. storage_guild_storageclose(sd); guild_send_dot_remove(sd); channel_pcquit(sd,3); //leave guild and ally chan sd->status.guild_id = 0; sd->guild = NULL; sd->guild_emblem_id = 0; if (g->instance_id) { struct map_data *mapdata = map_getmapdata(sd->bl.m); if (mapdata->instance_id) { // User was on the instance map if (mapdata->save.map) pc_setpos(sd, mapdata->save.map, mapdata->save.x, mapdata->save.y, CLR_TELEPORT); else pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT); } } clif_name_area(&sd->bl); //Update display name [Skotlex] status_change_end(&sd->bl,SC_LEADERSHIP,INVALID_TIMER); status_change_end(&sd->bl,SC_GLORYWOUNDS,INVALID_TIMER); status_change_end(&sd->bl,SC_SOULCOLD,INVALID_TIMER); status_change_end(&sd->bl,SC_HAWKEYES,INVALID_TIMER); status_change_end(&sd->bl,SC_EMERGENCY_MOVE,INVALID_TIMER); //@TODO: Send emblem update to self and people around } else { npc_event_doall_id("OnKickGuild"); } If they are not online when being kicked it would trigger OnKickGuild without an RID attached. Edit: Also moved topic to source requests since it's becoming a source thing.
  3. - script Sample -1,{ OnPointGet: #CASHPOINTS++; end; OnPCLoginEvent: addtimer 60000,"Sample::OnPointGet"; }
  4. Skorm

    PVP Party Warp

    Ahh yeah I see what they meant by that now sorry about that. I blame crappy documentation.
  5. Skorm

    PVP Party Warp

    Ahh yeah I forgot that [email protected]_id was no longer being set. Anyways the way you have it now will not work right since warpparty is within the for loop. In my example it is outside the for loop and will only get run once as it should. Also I've modified my original post with the corrected script segment.
  6. Ahh yeah would be interesting if someone could dig up the files for it. Would work well if the 3d bones client mod.
  7. Skorm

    PVP Party Warp

    setarray [email protected]_maps$, "prontera", "izlude", "geffen", "morroc"; if(getpartyleader(getcharid(1),2) == getcharid(0)) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]] ) ) if(inarray([email protected]_maps$, strcharinfo(3,[email protected][[email protected]])) > -1) warp "pvp_y_1-2",0,0,[email protected][[email protected]]; warpparty "Leader",0,0,getcharid(1),"pvp_y_1-2",1,1; }
  8. Really questions like this should be asked on their own so it's easier for other users to find and search them... But as far as I know there is not. To add one that has an rid for an online character and would only run in that case you would add it in this statement. https://github.com/rathena/rathena/blob/master/src/map/guild.cpp#L983 npc_event_doall_id("OnLeaveGuild", account_id);
  9. Sorry about that yeah you're right they were doing the same thing here is an updated version. - script warp_block -1,{ OnInit: bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",20,99; setarray .maps_from$[0], "guild_01", "guild_02"; // Maps they cannot warp from. setarray .maps_to$[0], "guild_01", "guild_02"; // Maps they cannot warp to. end; OnAtcommand: if(inarray(.maps_from$[0], strcharinfo(3))>-1) { message strcharinfo(0), "You can't open use warp here!"; end; } if([email protected]_numparameters) { if (inarray(.maps_to$[0], strtolower([email protected]_parameters$[0]))>-1) { message strcharinfo(0), "You can't warp to that map!"; end; } atcommand "@warp "+ implode([email protected]_parameters$, " "); } else atcommand "@warp"; end; }
  10. @Origami - script warp_block -1,{ OnInit: bindatcmd "warp",strnpcinfo(3)+"::OnAtcommand",20,99; setarray .maps_from$[0], "guild_01", "guild_02"; // Maps they cannot warp from. setarray .maps_to$[0], "guild_01", "guild_02"; // Maps they cannot warp to. end; OnAtcommand: if(inarray(.maps_from$[0], strcharinfo(3))>-1) { message strcharinfo(0), "You can't open use warp here!"; end; } else if (inarray(.maps_to$[0], strcharinfo(3))>-1) { message strcharinfo(0), "You can't warp to that map!"; end; } if([email protected]_numparameters) atcommand "@warp "+ implode([email protected]_parameters$, " "); else atcommand "@warp"; end; } I'm just assuming your gms are group level 20 or above. Script is untested.
  11. @Emistry Pretty sure you could just the the commands for it... It's like @size 1-3 or something.
  12. @Get Backers Seems like you've got the right idea... It's strnpcinfo(0) not NPC_NAME though. - script LoginRewards#1 -1,{ OnPCLoginEvent: addtimer 3600000, strnpcinfo(0)+"::OnClaimReward"; end; OnClaimReward: dispbottom "You have been online 1 hour. Talk to Hourly Reward NPC to get your rewards!"; }
  13. If the instance hasn't been destroyed you need to get the instance id... https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L9093 When you have the instance id you can then use the instance_mapname command and warp the play back to that instanced map. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L9085 The full thing might look like... warp instance_mapname("prontera",instance_id(IM_PARTY)), 0, 0; This is if the player in question started an instance of the prontera map and we wanted to warp them back there.
  14. The scripting language is pretty primitive and while I don't have time to completely review your script associative arrays are not a thing. By just glancing and reading through what you've posted that's what I think you're trying to accomplish... There are some ways of making something similar though, but it is not recommended for multiple repetitions because it's cumbersome. Anyways... setarray [email protected]$, "greg", "frank", "ashe"; Works... setarray [email protected], "greg", "frank", "ashe"; Doesn't Work. Furthermore: [email protected] = getarraysize([email protected]$); for([email protected] = 0; [email protected] < [email protected]; [email protected]++) { for([email protected] = 1; [email protected] < 11; [email protected]++) { setd "[email protected]_"[email protected]$[[email protected]]+"_things["[email protected]+"]", [email protected]; } } In this example I create 3 new arrays from the [email protected]$ array above... [email protected]_greg_things = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; [email protected]_frank_things = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; [email protected]_ashe_things = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; I'm by no means saying this is best practice but it's something that can be done. I'm pretty sure... setarray getd("[email protected]_"[email protected]$[0]+"_things"), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; Will also work to create an array like... [email protected]_greg_things = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; I could then access gerg's values like... mes "Greg's first value is... "+getd("[email protected]_"[email protected]$[0]+"_things[0]"); Output would be Greg's first value is... 1
  15. Again Poring King is correct you should be able to call Cutin on any script that is connected to a player. You could call a function from the script section of your itemdb for the item that you want to use as your random animation thing. The function npc would then trigger the cutin animation. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L1563 https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L7644
  16. @Poring King is right but unfortunately for you @sacrox the script you've posted above isn't very dynamic and would require editing almost every line to create an effective last warp option.
  17. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L859 OnHour00: OnHour03: OnHour06: OnHour09: OnHour12: OnHour15: OnHour18: OnHour21: Use labels and commands like disablenpc and enablenpc to hide and display npcs.
  18. switch(input([email protected], 1, 30000)) { case -1: //Values less than 1 case 1: //Values greater than 30000 mes "Something went wrong!"; close2; cutin "",255; end; default: break; } if ([email protected] > goldPoint) { mes "Sorry, you don't have any Gold"; close2; cutin "",255; end; } https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L1556
  19. @Tokei made a mapcache editor that superseded weemapcache. If you really need weemapcache I have it. WeeMapCache.exe
  20. :< You don't have to go forever and stuff.
  21. prontera,154,179,4 script summoner 100,{ if(countitem(512) > 500){ delitem 512,500; monster "prontera", 0, 0, "Poring", 1005, 1, strnpcinfo(0) + "::OnMobKilled"; monster "prontera", 0, 0, "Poring", 1115, 1, strnpcinfo(0) + "::OnMobKilled"; } else { mes "sorry you need 500 apple to summon"; close; } end; OnMobKilled: set [email protected], rand(1,5); //quantity of different items set [email protected], rand(.size); //Which item was chosen set [email protected], rand(1,10); //Quantity of item you will receive for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) getitem [email protected], [email protected]; end; OnInit: setarray .listItems[0], 500, 501, 502, 503, 504, 505, 506, 507; //Items .size = getarraysize(.listItems); } There are still a few problems with the script but I don't have time. If you want the item to look like it dropped. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L4827
  22. Just load it like you would any other NPC. Also you shouldn't necro really old topics like this there is more than enough information out there about loading in NPCs.
  23. It's bound to @monster command... Just do @monster 3 will summon 3 of a random mob id from that list.
  24. Skorm

    erro script

    Change additem to getitem.
  25. So in November I started making my own GameCube controller for the GameBoy Player and wasn't able to finish it because of school, but it's finally done and I love you guys so I'm going to share it here.
×
×
  • Create New...

Important Information

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