Jump to content

GmOcean

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by GmOcean

  1. I did not test this yet, but this should do the following: 1. When [ P.A ] kills [ P.B ], [ P.A ] will gain a +10,000z bounty (ex. 0 + 10,000 OR 10,000 + 10,000). Also [ P.B ] will have his/her bounty set to 0 for dieing. 2. It will then announce that [ P.A ] killed [ P.B ] and his or her bounty is: X0,000 zeny, Wanted Level = Zeny / 10,000. ( 10K zeny = Wanted Level 1 | 250K Zeny = Wanted Level 25 ). 3. Additionally, it should also put commas ( , ) where they are supposed to, so people see the 10,000 as i just typed it rather than 10000. (For looks only. *Note - I did not test the coding for it but should work). 4. And ofcourse [ P.A ] gets the zeny reward for killing [ P.B ]. - script bounty_script -1,{ OnPCKillEvent: if(killedrid == killerrid){end;} //Prevent Suicide. attachrid(killedrid); set .zeny, getd(".bounty"+ getcharid(0) +""); setd ".bounty"+ getcharid(0) +"",0; //Sets Bounty to 0 if they die. attachrid(killerrid); set zeny,zeny + .zeny; setd ".bounty"+ getcharid(0) +"", getd(".bounty"+ getcharid(0) +"") + 10000; //Sets Bounty to +10,000 per kill. set .@a$, ""+ getd(".bounty"+ getcharid(0) +"") +""; set .@b, getstrlen(.@a$); while(.@c < .@ {insertchar(.@a$,",",(.@b - 3)); set .@c,.@c+3;} announce "["+ rid2name(killerrid) +"] has killed ["+ rid2name(killedrid) +"]. "+ (Sex?"He":"She") +" has a bounty of: "+ .@a$ +" zeny! [ WANTED LEVEL "+ (getd(".bounty"+ getcharid(0) +"") / 10000) +" ]",bc_blue|bc_all; end; }
  2. Ahh, see. I knew it lol. I know i can choose downloads, but i had assumed, Forums, was like EVERYTHING, was hoping including downloads T.T
  3. Oh? Funny nothing showed up when I searched for equip2. I guess Forums and Downloads aren't shared under the same Search? Dunno, but my search yielded nothing. Thanks for that. Edit: Still should be put into future revisions by default though imo.
  4. As the topic title states, I'm requesting for an equip2 command. It should preferably go like so: equip2(<item id>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>); equip2("<item name>",<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>); As of right now, if we try to use the equip command, it will equip the first item in the players inventory with the given ID, so if i have a +0Knife, but i want to equip the +10Knife, it will equip the +0Knife if the +10 one, comes after it in the inventory. With this command, we could actually specify exactly which item, we want to equip them with. Granted I know this isn't something everyone wants or needs, i just thought it should be created. I for one, do need it and want it, but I also feel this command should be imported to the current rA revision. As it is a command that I feel should have been implemented a long time ago, seeing as we have getitem2/delitem2 as well as countitem2.
  5. Actually, they don't have to be wav files anymore rAthena supports .mp3 files in BGM folder, to be called and played to a player ingame. *playBGM "<BGM filename>"; *playBGMall "<BGM filename>"{,"<map name>"{,<x0>,<y0>,<x1>,<y1>}}; These two commands will play a Background Music to either the invoking character only ('playBGM') or multiple characters ('playBGMall'). BGM filename is the filename in /BGM/ folder. It has to be in .mp3 extension. It's not required to specify the extension inside the script. If coordinates are omitted, BGM will be broadcasted on the entire map. If the map name is omitted as well the BGM will be played for the entire server. You can add your own BGMs this way, naturally.
  6. Not quite. Your close but kinda a bit off. OnInit: set .m$,"ftown"; setcell .m$,150,100,100,150,cell_water,1; end; //When player uses fishing rod FishingLabel: getmapxy(.@m$,.@x,.@y,0); if( !checkcell(.@m$,.@x,.@y,cell_chkwater) ) {dispbottom "I need to be closer to the water to fish."; end;} //Do fishing (because they are close to water).
  7. Yes, but it'd probably be better to use the NPC to check, because if we use checkcell, then we'd also have to setcell as well, because let's face it, no one stands in the water to fish unless your fly fishing. So i'd have to use setcell on land to specify a certain area that can fish which will act like water, but appear as sand. Which does mean skills that require water can be used in that spot.
  8. ahh i see, i over looked that lol, 200x200 cell range.
  9. Interesting script. Not too difficult to redo, my only concern is how does it know your near water. Because I've failed to see a cellcheck of any sort, nor do i think you can even check for water.
  10. ....Disguise Event lmao. It's been years since I made that thing back in eA. Perhaps I should remake it O.o but i dunno.
  11. Wasn't there a mod released awhile back that would allow you to give NPC's temporary stats for the duration of a script?
  12. @Skorm - Yea lol, i realized i could simply it even more by using Atoi, and make it cleaner, sometimes i over think things and don't see the reality of how easy it can be done.BUT i'm too lazy to re-write it since i gotta go out. So meh, someone else now has an idea and can now show their skills.
  13. @CaioVictor - Hmm, isn't it already their normal ID, or is that only when it's killedrid? I'm not sure if this is the case but if it is the case, then i'm afraid that atm there isn't really a way to convert them into one another. Atleast not through normal monster spawns. If you wanted to though, you COULD do it using BGmonster command. And then saving the information along with it's normal MobID into a new array, and call the information when needed. Here's an example using somewhat advanced form of scripting to optimize. (Other wise you'd be looping for ever figuring shit out.). Saving the Information into an Array set .@GID$[0],""+ bg_monster(.gid,"<map_name>",<x>,<y>,"<mob_name>",<mob_id>,"<event_label>") +""; set .@GID[1],""+ <mob_id> +""; //Use the mob ID for the monster above. set .gid$[getarraysize(.gid$)],implode(.@GID$,"#"); end; Calling it back after player dies. OnPCDieEvent: if(killerrid == getcharid(0)){end;} for(set .@i,0; .@i< getarraysize(.gid$); set .@i,.@i+1) {if( compare(.gid$[.@i],killerrid) ) {explode(.@mobinfo$,.gid$[.@i],"#"); dispbottom "GID = "+ .@mobinfo$[0]; dispbottom "MobID = "+ .@mobinfo$[1]; end;} }
  14. @Emistry - Good spot lol, i thought i had made it refresh timer lmao. Can be so forgetful when I'm tired. At anyrate, you can use Emistry's script, it's far more refined than mine. (I'm still too rusty gotta get back into scripting shape lol).
  15. This is a very basic script. Mostly just a template so you can follow it and improve your own scripting skills. Annotations are included so you can follow along. <map_name>,<x>,<y>,<z>%TAB%script%TAB%<npc_name>%TAB%<sprite_id>,{ set @Okills,@Nkills; //Sets Old Kills to equal New kills. This is incase they warp out on their own or by other means. (You could set to 0. But there is no need.) warp "<map_name>",<x>,<y>; // Replace with coordinates of PvP room. end; OnTimer30000: // 30 second timer label triggered after 30seconds. if(@Okills == @Nkills){ atcommand "@die"; sleep2 1000; warp "Savepoint",0,0; end;} // Checks to see if Old kills == New kills, if they do, that means they haven't killed anyone in 30seconds. set @Okills,@Nkills; setnpctimer 0; //Reset Timer. (Could be done with just initnpctimer but it's here to makesure it resets. initnpctimer; end; OnPCKillEvent: //Gives player a +1 whenever they kill someone. Used during the check at 30seconds. set @Nkills,@Nkills + 1; end; }
  16. Announce "Satan Catcher Event is being held!",bc_all; sleep 5000; Announce "The warp portal has appeared in izlude infront of me!",bc_all; enablenpc "satanevent"; initnpctimer; end; Right above that, so it will look like this: case 2: next; mes .@name$; mes "Starting Event..."; close2; OnClockXXXX: //Placing this here, will have it start the NPC event. Announce "Satan Catcher Event is being held!",bc_all; sleep 5000; Announce "The warp portal has appeared in izlude infront of me!",bc_all; enablenpc "satanevent"; initnpctimer; end; *Note - While this WILL make it auto-start. It will also error out the script, because the rewards aren't set. To fix this, simply change the $@Variables into $Variables. This is because $@ is a Temp-Global var, and well, with an event like this that will continue to run and be on the server, you might as well use perm-global vars. 2 or 3 of these isn't gonna hurt your servers performancec at all.
  17. Oh no, of course not lol. I'm not one to take anything over the internet to heart lol. I was just merely replying to give acknowledgement of my viewing and understanding your concerns. However I do agree that would be a choice they'd have to make for themselves.
  18. @Xynvaroth - Yea, I realized that. But this was just a way to show them a simplified version. Additionally, even if they run it the old way, with OnTimerXXXX: It will still run 1 script per player. Not including those who have stayed AFK/Vending. Though, with the simplified version, this can all be checked and verified as well. So, the only thing they need to do now, is filter out the vender's and AFK people. Normally that would reduce the script count by 15-20% depending on server population.
  19. @Evelynn, The solution to what your looking for, can be found with the documentation listed in script_commands.txt. Just run this check in the OnEquip section of the weapon. if( ( getcharid(0) & 65535 ) != (getequipcardid(4,2)) ){unequip(4);}
  20. Well, first off this can easily be made with a Sleep2 Infinite loop. - script play_time -,{ OnPCLoginEvent: iSleeploop: sleep2 900000; set @playtime,@playtime+1; set #CASHPOINTS, #CASHPOINTS + 20; if(@playtime == 4){ set #CASHPOINT, #CASHPOINTS + 100; set @playtime,0; dispbottom "You've been rewarded 100 CASHPOINTS for playing for 1 consecutive hour."; goto iSleepLoop;} dispbottom "You've been rewarded 20 CASHPOINTS for playing for "+ ( 15 * @playtime ) +" minutes."; goto iSleepLoop: end; }
  21. I'm not sure if i understand what your asking 100%. But it sounds like your problem is that, Desperado will stop it's animation and dmg, when EDP takes affect. So, the scenario i see is this... 1. You use the skill Desperado which activates EDP on yourself. 2. EDP activates, and Desperado pauses, while EDP effect is being shown. 3. Desperado continues and finishes up. So, at #2 I'm assuming this is your problem. This should be fixed by removing auto-casting the skill, but instead giving the affect. This way, desperado will be cast, but won't pause to show EDP animation. But it should still give you the damage bonuses. Then again, that's only if i understand the problem @.@
  22. Hmm, it's not too hard to make, but sadly, it is quite an advanced request. Some issue I can see with your script is: 1. Your storing information of the equipped item, but as far as I know it only stores the <item_id>. This means that if you want to equip it later, it will equip anyitem that has the same ID. ex: You store the equips, and your wearing a +10 Knife. Then you put on a +10 Blade. And now want to switch back, if you have a +0 Knife in your inventory, BEFORE the +10 Knife, it will equip the +0 Knife because the +10 Knife comes after it in the inventory space. To fix this you need to store all of it' information (Refine-rate, Cards, Item ID). This information can be retrieved and filtered using "getinventorylist" command. You would first, use the command, to create a group of arrays. Then you would filter out which ones you need, by seeing if it's equipped, using one of the arrays it creates (@inventorylist_equip[]) 2. Your saving the information into an NPC variable. While this may be more resource friendly vs, saving to a Perm-Char variable, I suggest using a MySQL database, to store the information, so it can be called later, additionally this will allow for alot of improvements to be made later if needed. Now while not an ' issue ' with the script. You could use loops and arrays to equip and display the builds. Reducing the length of the script, and making it look cleaner. Hope this helps you in regards to structuring your script.
  23. O.o Big things are happening....

  24. Or, you could just make a monster with a ridiculously high amount of attack and dex/luk to garantee a hit. But this type of thing is best simulated with an NPC.
  25. Unfortunately no, you'd be unable to use the script.
×
×
  • Create New...