Jump to content

GmOcean

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by GmOcean

  1. Well, the next best thing to do is reverse the effects as given. set costume_head_top,getequipname(EQP_HEAD_TOP); if( ep&EQP_HEAD_TOP ) { ep &= EQP_HEAD_TOP; ep |= EQP_COSTUME_HEAD_TOP; } if( getequipname(EQP_COSTUME_HEAD_TOP) == costume_head_top){bonus bMdef,-5; bonus bAllStats,-1;} That basically stores the name of the currently equipped head gear in a variable, then equips it as a costume, then gives them the negative version of the helms stats.
  2. Yes, but if your script is written correctly, you can easily just ping a specific part of your db producing everything as needed. But its still no different than killing a mob normally. See right now it'll do this without a sql db. Kill monster -> Ping db to get drop info -> calculate chane -> give item. if you added another sql db file for your custom script it'll do this. Kill monster -> ping db to get drop info -> calculate chance -> give item -> ping custom db to get drop info -> calculate chance -> give item. It's basically the same as having 2x your player count. So if you had 100 people kiling stuff, its the same as if you had 200 people killing stuff. Not that bad really, considering most hosting packages offer you more than the needed amount for players. Example: a Hosting pack of 1-200 players can easily host 500 players without lag. In short,if you write the script correctly, your server won't even feel it.
  3. Yes, i've recompiled and tested logging in each time. Also, my client is diffed to not read LUA before LUB and also diffed not to read DATA folder first. And yes, i'm using the WDGSkipPacketHeaderObfuscation.dll as well.
  4. 256 if i remember correctly. Which is why most people have made the conversion to SQL. Since SQL can hold well over 1,000 different rows/columns. In short, i could make a database where 1 monster could drop over 1,000 items, and each of them have their own drop rate.
  5. Okay so, up until today, my friends were able to connect using the: 2012-04-10a client. That's when I decided to update to a newer client: 2012-05-15a. I did everything i was supposed to and yet for some reason they can't connect. All Ports & IPs have been verified 3x. packet_db version: is 31 (Thats what i have 2012-05-15a set as). Clientinfo.xml has: 31 as its version. mmo.h has: 20120515 clif.h has: MAX_PACKET_VER: 31 Both of our RO's are fully updated and were fully updated while using 20120410 client, so i see no reason why that would affect it. What's more is, he's not getting any errors, and to add to that, my login server isn't detecting him logging in at all, so i'm starting to think it isn't an issue with the packet version, but something else, is there anything i missed?
  6. It might be for event purposes were they only drop at blah blah time / MAP. Also, alot of monsters have their drop slots filled. So to add more we'd need to edit the src.
  7. - script MobExtraDrops -1,{ OnNPCKillEvent: // Configuration setarray .@MobID[0], 1374, 1370, 1754, 1492, 1871, 1150, 1147, 1243, 1039, 1115, 1148, 1167, 1159, 1163, 1276, 1685, 1369, 1110; // Monsters ID setarray .@DropID[0], 28307, 28308, 28108, 28304, 28209, 28114, 28102, 28319, 28134, 28135, 28136, 28137, 28142, 28143, 28143, 28221, 28322, 28132; // Items ID setarray .@Chance[0], 75, 75, 250, 250, 250, 250, 250, 75, 250, 250, 100, 75, 250, 75, 75, 250, 75, 75; // Drop Rate, as in percentage (100 = 1%) // End of Config for(set .@c,0; .@c < getarraysize(.@MobID); set .@c, .@c + 1) { if (killedrid == .@MobID[.@c]){ set .@d, rand(0,10000); if (.@d <= .@Chance[.@c]) { getitem .@DropID[.@c],1; } } } end; } // MVP ID Backup // setarray @MobID,1038,1039,1046,1150,1511,1647,1785,1630,1874,1272, // 1719,1389,1112,1115,1418,1871,1252,1768,1086,1990, // 1649,1651,1832,1492,1734,1779,1251,1688,1646,1373, // 1147,1059,1150,1087,1190,1157,1159,1623,1650,1708, // 1583,1991,1312,1751,1685,1658,1648,1917,1885; Firstly since your using an OnNPCKillEvent, it'll be better to use temporary variables, in this case, .@c & .@d. No need to store the data if you don't need to. Secondly i changed the end; command to AFTER the for() command, to stop it from ending prematurely thus not reaching the other monsters. Because from what i can see your script was doing this: Kill monster -> Check to see if monster == information in array ->if yes: work properly -> if no: end; -> no more checks.
  8. This should do what you want (Havent Tested for Errors). CREATE TABLE `ragnarok`.`custom_drop_rate` ( `char_id` INT(11) NOT NULL AUTO_INCREMENT , `mob_id` SMALLINT(6) UNSIGNED NULL , `kills` INT UNSIGNED NULL , PRIMARY KEY (`char_id`) ); - script CustomDropRates -1,{ OnNPCKillEvent: callfunc "DropItemRate"; end; function script DropItemRate { set @i,0; set @dropID,0; set @j,0; deletearray $@MobDrop_item[0],128; deletearray $@MobDrop_rate[0],128; getmobdrops(killedrid); if($@MobDrop_count<=0){end;} query_sql"SELECT `kills` FROM `custom_drop_rate` WHERE `mob_id`='"+killedrid+"' AND `char_id`='"+getcharid(0)+"'",.@kills; iDropItemLoop: set @i,rand(1,10000); if(@dropID == $@MobDrop_count){dispbottom "Success"; end;} //Checking to see if its an equipment type item. if($@MobDrop_rate[@dropID]>=10000 && getiteminfo($@MobDrop_item[@dropID],2)==4 || $@MobDrop_rate[@dropID]>=10000 && getiteminfo($@MobDrop_item[@dropID],2)==5) //Deletes the "Equipment" type item if it had a normal Drop Rate of 100% {delitem2 $@MobDrop_item[@dropID],1,0,0,0,0,0,0,0; goto iGetItem;} //Deletes the specified item if it had a normal Drop rate of 100% if($@MobDrop_rate[@dropID]>=10000){delitem $@MobDrop_item[@dropid],1; goto iGetItem;} iGetItem: //Checks to see if @i is <= Drop Chance OR if @i >= 100% drop. //If all is true it will give you the item. So if the item was deleted from above, //You got it back now. if(@i <= ($@MobDrop_rate[@dropID] + .@kills) ) {getitem $@MobDrop_item[@dropID],1; set @dropID,@dropID+1; goto iDropItemLoop;} set @dropID,@dropID+1; goto iDropItemLoop; end; } Note - If an item drops at 100% this script will delete it from your inventory, BUT it will give you another one back. (Assuming the script works as intended). Sorry, but there is no way around this. This is to ensure you don't kill a monster and get the drops twice. Example: Kill 1 Poring get 2 Poring Cards.
  9. GmOcean

    remove effect

    clif_refresh(sd) Though its sorta the same thing. Like the at_command @refresh says, its like using @jumpto your current spot. The effect is nearly instant.
  10. just add a check for the GM lvl near the top. if(getgmlevel()!=99){end;}
  11. replace the item's existing script with this: set .@i,groupranditem(IG_GROUPNAME); getitem .@i,1; announce strcharinfo(0) +" has aquired "+getitemname(.@i)+" !",bc_all;
  12. Okay, so i have a quick question. From my understanding, i can manually add as many groups (gm groups) as i want correct? So, theortically i could have 1,000+ Groups provided i write them in correctly? Edit: And no, i'm not gonna add 1,000 groups if possible lol, that's just unrealistic.
  13. Thanks, but i managed to figure it out. I even made a setdirection command based on the info Brian gave me. I had the getdirection command store the information in variables.
  14. That's fine. I don't really care for which direction the client sees me as long as the src side is accurate.
  15. CREATE TABLE `ragnarok`.`auto_announce` ( `id` SMALLINT(5) NOT NULL AUTO_INCREMENT , `msg` TEXT NULL , `clock` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0 , `type` VARCHAR(45) NULL , `desc` VARCHAR(45) NULL, PRIMARY KEY (`id`) ) ENGINE = MyISAM; mapname,x,y,z script auto_announe 123,{ setarray .@t$[1],"Notice","Event","Misc"; //Add more as needed. menu "Update MSGs",iUMSG,"Delete MSGs",iDMSG,"Cancel",iCancel; iCancel: close; iUMSG: mes "Type what your MSG will say."; mes "Example: ^00FF00 Like ExampleRO? Remember to vote every day!^000000"; input .@msg$; next; mes "Are you sure about the following message?"; mes .@msg$; menu "Yes",-,"No",iCancel; next; mes "Enter what time your message should appear."; mes "Example: ^00FF00 0000 = 12AM. 1200 = 12PM. 1812 = 6:12PM."; input .@clock; next; mes "Are you sure about this time?"; mes ""+.@clock+""; menu "Yes",-,"No",iCancel; next; mes "Enter What type of message this is."; mes "Example: ^00FF00 Notice = Important information.^000000"; mes "Example: ^00FF00 Event = Messages that are informative about events.^000000"; mes "Example: ^00FF00 Misc = Everything else.^000000"; set .@menu$,":"; for(set .@i,0; .@i<getarraysize(.t$); set .@i,.@i+1) {set .@menu$,.@menu$+""+.t$[.@i]+":";} menu .@menu$,-; set .@type$,.t$[@menu]; next; mes "Are you sure about this type?"; mes .@type$; menu "Yes",-,"No",iCancel; next; mes "Please give a brief description so you can recognize it"; mes "Note - Description can be no longer than 20 characters."; input .@desc$; if(getstrlen(.@desc$)>20) {next; mes "Invalid Description (Too Long). Try again."; mes "Remember description can be no more than 20 keystrokes."; input .@desc$; if(getstrlen(.@desc$)>20){next; mes "Invalid Description (Too Long)."; close;} } query_sql"INSERT INTO `auto_announce`(`id`,`msg`,`clock`,`type`,`desc`)VALUES(,'"+.@msg$+"','"+.@clock+"','"+.@type$+"','"+.@desc$+"')"; next; mes "The following message will appear at the given time with limitations to its type."; mes "^00FF00"+.@msg$+"^000000"; mes "Time: ^00FF00"+.@clock+"^000000"; mes "Type: ^00FF00"+.@type$+"^000000"; mes "Desc: ^00FF00"+.@desc$+"^000000"; close; iDMSG: mes "What type of message do you want to DELETE?"; set .@menu,":"; for(set .@i,0; .@i<getarraysize(.t$); set .@i,.@i+1) {set .@menu$,.@menu$+""+.t$[.@i]+":";} menu .@menu$,-; set .@type$,.t$[@menu]; query_sql"SELECT(`id`,`msg`,`clock`,`desc`)FROM `auto_announce` WHERE `type`='"+.@type$+"'",.@id,.@msg$,.@clock,.@desc$; iDEL: next; mes "Select the message you wish to delete."; set .@menu$,":"; for(set .@j,0; .@j<getarraysize(.@id); set .@j,.@j+1) {set .@menu$,.@menu+"Desc:^00FF00"+.@desc$[.@j]+"^000000 Time: ^00FF00"+.@clock[.@j]+"^000000";} menu .@menu$,-; next; mes "Are you sure you want to delete the following message?"; mes "^00FF00"+.@msg$[@menu]+"^000000"; mes "Time: ^00FF00"+.@clock[@menu]+"^000000"; mes "Type: ^00FF00"+.@type$[@menu]+"^000000"; mes "Desc: ^00FF00"+.@desc$[@menu]+"^000000"; menu "Yes",-,"No",iDEL,"Cancel",iCancel; query_sql"DELETE FROM `auto_announce` WHERE `desc`='"+.@desc$[[@menu]]+"' AND `type`='"+.@type$[@menu]+"' AND `time`='"+.@clock[@menu]+"'"; next; mes "Message Deleted."; close; OnInit: setarray .t$[1],"Notice","Event","Misc"; //Add more as needed. set .type$,.t$[1]; //Do not use 0 as it will break the script. query_sql"SELECT(`clock`)FROM(`auto_announce`)WHERE(`type`='"+.type$+"')",.@clock; for(set .@i,0; .@i<getarraysize(.@clock); set .@i,.@i+1) {set .clock$[.@i],""+.@clock[.@i]+""; set .clock[.@i],.@clock[.@i];} setnpctimer 0; startnpctimer; end; OnTimer60000: set .@time$,""+gettime(3)+""+gettime(2)+""; for(set .@i,0; .@i<getarraysize(.clock$); set .@i,.@i+1) {if(.@time$ == .clock$[.@i]) {setnpctimer 0; query_sql"SELECT(`msg`)FROM(`auto_announce`)WHERE(`clock`='"+.clock[.@i]+"' AND `type`='"+.@type$+"')",.@msg$; announce .@msg$; end;} setnpctimer 0; end; }CREATE TABLE `ragnarok`.`auto_announce` ( `id` SMALLINT(5) NOT NULL AUTO_INCREMENT , `msg` TEXT NULL , `clock` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0 , `type` VARCHAR(45) NULL , `desc` VARCHAR(45) NULL, PRIMARY KEY (`id`) ) ENGINE = MyISAM; mapname,x,y,z script auto_announe 123,{ setarray .@t$[1],"Notice","Event","Misc"; //Add more as needed. menu "Update MSGs",iUMSG,"Delete MSGs",iDMSG,"Cancel",iCancel; iCancel: close; iUMSG: mes "Type what your MSG will say."; mes "Example: ^00FF00 Like ExampleRO? Remember to vote every day!^000000"; input .@msg$; next; mes "Are you sure about the following message?"; mes .@msg$; menu "Yes",-,"No",iCancel; next; mes "Enter what time your message should appear."; mes "Example: ^00FF00 0000 = 12AM. 1200 = 12PM. 1812 = 6:12PM."; input .@clock; next; mes "Are you sure about this time?"; mes ""+.@clock+""; menu "Yes",-,"No",iCancel; next; mes "Enter What type of message this is."; mes "Example: ^00FF00 Notice = Important information.^000000"; mes "Example: ^00FF00 Event = Messages that are informative about events.^000000"; mes "Example: ^00FF00 Misc = Everything else.^000000"; set .@menu$,":"; for(set .@i,0; .@i<getarraysize(.t$); set .@i,.@i+1) {set .@menu$,.@menu$+""+.t$[.@i]+":";} menu .@menu$,-; set .@type$,.t$[@menu]; next; mes "Are you sure about this type?"; mes .@type$; menu "Yes",-,"No",iCancel; next; mes "Please give a brief description so you can recognize it"; mes "Note - Description can be no longer than 20 characters."; input .@desc$; if(getstrlen(.@desc$)>20) {next; mes "Invalid Description (Too Long). Try again."; mes "Remember description can be no more than 20 keystrokes."; input .@desc$; if(getstrlen(.@desc$)>20){next; mes "Invalid Description (Too Long)."; close;} } query_sql"INSERT INTO `auto_announce`(`id`,`msg`,`clock`,`type`,`desc`)VALUES(,'"+.@msg$+"','"+.@clock+"','"+.@type$+"','"+.@desc$+"')"; next; mes "The following message will appear at the given time with limitations to its type."; mes "^00FF00"+.@msg$+"^000000"; mes "Time: ^00FF00"+.@clock+"^000000"; mes "Type: ^00FF00"+.@type$+"^000000"; mes "Desc: ^00FF00"+.@desc$+"^000000"; close; iDMSG: mes "What type of message do you want to DELETE?"; set .@menu,":"; for(set .@i,0; .@i<getarraysize(.t$); set .@i,.@i+1) {set .@menu$,.@menu$+""+.t$[.@i]+":";} menu .@menu$,-; set .@type$,.t$[@menu]; query_sql"SELECT(`id`,`msg`,`clock`,`desc`)FROM `auto_announce` WHERE `type`='"+.@type$+"'",.@id,.@msg$,.@clock,.@desc$; iDEL: next; mes "Select the message you wish to delete."; set .@menu$,":"; for(set .@j,0; .@j<getarraysize(.@id); set .@j,.@j+1) {set .@menu$,.@menu+"Desc:^00FF00"+.@desc$[.@j]+"^000000 Time: ^00FF00"+.@clock[.@j]+"^000000";} menu .@menu$,-; next; mes "Are you sure you want to delete the following message?"; mes "^00FF00"+.@msg$[@menu]+"^000000"; mes "Time: ^00FF00"+.@clock[@menu]+"^000000"; mes "Type: ^00FF00"+.@type$[@menu]+"^000000"; mes "Desc: ^00FF00"+.@desc$[@menu]+"^000000"; menu "Yes",-,"No",iDEL,"Cancel",iCancel; query_sql"DELETE FROM `auto_announce` WHERE `desc`='"+.@desc$[[@menu]]+"' AND `type`='"+.@type$[@menu]+"' AND `time`='"+.@clock[@menu]+"'"; next; mes "Message Deleted."; close; OnInit: setarray .t$[1],"Notice","Event","Misc"; //Add more as needed. set .type$,.t$[1]; //Do not use 0 as it will break the script. query_sql"SELECT(`clock`)FROM(`auto_announce`)WHERE(`type`='"+.type$+"')",.@clock; for(set .@i,0; .@i<getarraysize(.@clock); set .@i,.@i+1) {set .clock$[.@i],""+.@clock[.@i]+""; set .clock[.@i],.@clock[.@i];} setnpctimer 0; startnpctimer; end; OnTimer60000: set .@time$,""+gettime(3)+""+gettime(2)+""; for(set .@i,0; .@i<getarraysize(.clock$); set .@i,.@i+1) {if(.@time$ == .clock$[.@i]) {setnpctimer 0; query_sql"SELECT(`msg`)FROM(`auto_announce`)WHERE(`clock`='"+.clock[.@i]+"' AND `type`='"+.@type$+"')",.@msg$; announce .@msg$; end;} setnpctimer 0; end; } Haven't tested it.
  16. bump. I still need help/requesting a command to find the direction a player is looking in. I wish to use it in conjunction with the PushPC command.
  17. I'm not 100% sure, but i believe that is correct, atleast from what i can see the formula is correct.
  18. Mental Wall in current Projects, however good progress has been made. :D

  19. Thanks, redownloading definately fixed that @.@; Strange though when they are exactly the same lol.
  20. rAthena/src/map/battle.c if( sd->right_weapon.def_ratio_atk_ele & (1<<tstatus->def_ele) || sd->right_weapon.def_ratio_atk_race & (1<<tstatus->race) || sd->right_weapon.def_ratio_atk_race & (1<<(is_boss(target)?RC_BOSS:RC_NONBOSS)) ) flag.pdef = 1; if( sd->left_weapon.def_ratio_atk_ele & (1<<tstatus->def_ele) || sd->left_weapon.def_ratio_atk_race & (1<<tstatus->race) || sd->left_weapon.def_ratio_atk_race & (1<<(is_boss(target)?RC_BOSS:RC_NONBOSS))
  21. Alright, so i have absolutely NO idea how i'm getting this error lol: [Error]: sv_readdb: Insufficient columns in line 1 of "db/re/skill_db.txt" (found 1, need at least 17). Apparently, my skill_db.txt file has quite a few columns missing from its very first line. Thing is, I have like 15-tuple checked it and sure enough, it definately has more than 1, 17 infact. 1,0,0,0,0,0,0,9,0,no,0,0,0,none,0, NV_BASIC,Basic Skill Nothing seems to be wrong while playing, i can definately level the skill up no problem... its just, I get that error popping up and i have no idea why @.@; Anyone got any clues?
  22. That's because, the SC_SpeedUp0 & SC_SpeedUp1 are hard coded in the src itself. Inshort, you'd either need to create a new speed, SC_SpeedUp2 OR edit one of the originals. I suggest making a new one since, editing existing ones would change existing items. But since your trying to change an item already just change this in: rAthena/src/map/status.c if( sc->data[sC_SPEEDUP0] ) // temporary item-based speedup val = max( val, 25 ); TO if( sc->data[sC_SPEEDUP0] ) // temporary item-based speedup val = max( val, 75 ); Or anything higher than 50. Since 50=Speed Potion speed, so 100= 2x Speed Potion speed.
  23. Hey, not sure if this will make it work or not, but i just stumbled upon this in: rAthena/src/common/mmo.h #define MIN_ATTRIBUTE 0 #define MAX_ATTRIBUTE 4 #define ATTRIBUTE_NORMAL 0 #define MIN_STAR 0 #define MAX_STAR 3 From what i can understand, those are the Attributes according to rAthena/db/const.txt Ele_Neutral 0 Ele_Water 1 Ele_Earth 2 Ele_Fire 3 Ele_Wind 4 Ele_Poison 5 Ele_Holy 6 Ele_Dark 7 Ele_Ghost 8 Ele_Undead 9 There for changing it to support more Attributes, MAY work. Not garanteed, but at this rate, 1 little edit couldn't hurt much.
  24. This occurs for 2 reasons. 1 - Because Bowling Bash is a +%dmg skill, instead of a flat rate like Pressure (2,000 dmg no matter what). 2 - The knight has a lack of dex to close the dmg gap. In RO, your minimal dmg and maximal dmg have quite a large gap, mostly apparent with skills, the more DEX you have the smaller the gap. So, as there are 2 issues, that are 2 fixes. 1 - Change your Thanatos Card effect to this: 4399,Thanatos_Card,Memory of Thanatos Card,6,20,,10,,,,,,,,2,,,,,{ bonus bDefRatioAtkRace,RC_Boss; bonus bDefRatioAtkRace,RC_NonBoss; bonus bSPDrainValue,-1; bonus bDef,-30; bonus bFlee,-30; },{sc_start SC_MAXIMIZEPOWER,60000,5;},{sc_end SC_MAXIMIZEPOWER;} The above will give the person wearing Thanatos Card, Maximize Power skill level 5 Effect, which is the equivalent of having infinite DEX. (Their DMG should always be the same number provided no equipment is changed on the target). 2 - Edit the src so that bDefRatioAtkRace increase dmg by a certain %and caps it there. Example: Make bDefRatioAtkRace deal 100% more dmg (2x) than, have it check if the dmg is over a certain number but less than another (e.g: DMG>10,000 && DMG<17,000 DMG == 16,000). Obviously, that is not written how the src needs it, but theoretically it should work, if you know how to code it.
  25. No, that wouldn't cause his random dmg to flux that much, because if you notice, he specified having it upgraded to 18-20, it would have stopped at 14. The only part if any would be the: bIgnoreDefRate bonus. Since you would deal different amounts of DMG depending on how much def a target has.
×
×
  • Create New...