Jump to content

GmOcean

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by GmOcean

  1. rAthena/db/(pre-re)re/refine.txt
  2. My question is how did you fix the issue in the first post, where the images weren't showing up. No matter what I do it doesn't seem to fix itself.
  3. Okay, so my basic problem is simple, the sprite and act files aren't being read while in my grf. Infact anychanges i make and put into my grf aren't being read. And yes, my client is diffed for read multiple grfs / Do NOT read LUA before LUB and do NOT read data folder first. I'm using 2012-05-15a client, so everything is done through iteminfo.lub. I've added my sprites to the correct folder following the guide on the wiki (where to put the files). However, they act as if they are not there. They do however, get read if I put them directly into my RO's data folder. But i don't want to do this. Is there a reason/fix to why its behaving this way? Additionally, my custom item's Collection/Item .bmp files are not appearing as well.
  4. That's because you have to declare your aliases in the src right? Unless i'm missing something.
  5. rAthena/conf/battle/exp.conf // MVP bonus exp rate. (Note 2) mvp_exp_rate: 100 This is where its changed, normally it'd just give the exp on it own, so just set it as 1, an you'll gain 1% bonus exp from being the MVP.
  6. Yes thats what happens. And use i'm using iteminfo.lub. It was working fine until just today, after I added nearly 300 item descriptions... So, thats why I kinda need a more accurate location to look than just inside ItemInfo.lub Edit: I found out its a syntax error, caused by typos. Atleast that's what i found so far. I fixed most of it, so now its time to sift through the rest of these entries. Edit 2: Solved, fixed all the typos that dealt with the syntax, and it fixed everything.
  7. Okay, so, I would fix this on my own, if knew where to look besides the file itself. CItemInfoMgr error found: 5th argument is must string Anyone have any idea what that is lol.
  8. Did you 'Diff' the client properly? (Make sure to remove: Read LUA before LUB & Read Data folder first). Also make sure to use: WDGSkipPacketHeaderObfuscation.dll Make sure they are in data/luafiles514/lua files Make sure your Clientinfo.xml is using the same version as your packet_db (31 in your case). Update your msgstringtable.txt to fix most of the text in your client.
  9. You "should" be able to create a sprite and it will work for all classes. Only problem is, each class has a different sprite meaning, that your sprite will look great on certain classes, but horrible on some. For instance, may look awsome on a Champion, but crappy on a Mounted LordKnight (LordKnight + Pecopeco). This is why the suggestion was made to make one for each class. So that it is fine tuned, to look great on them.
  10. I figured out the problem, however, it made me realize i was telling SQL to do something it can't. So, now we gotta decide, do 1 large query when they login/out. OR just update the database as they kill. I'll work on it later when I have time, but for now I'm thinking update as we go. Okay, so i was going to fix this script till i discovered an exploit which can't be fixed by normal script commands at the moment. The exploit being, that if a player doesn't have @autoloot 100% on. Then they can litterally, get 2x drops from monsters. As the script will give them items, based on kills, and the mobs will drop them to the ground. Sorry, but until the src for monsters drops becomes more flexible, like lets say, stopping drops if monsters are listed in a certain db file, this exploit will continue to exist. Only alternativve would be to set all drop rates to 0, AFTER making a duplicate db with the same info as the mob_db.
  11. If you use Spre's method, make sure you do a check for the item id, becuase `id` in inventory = # of item dropped since first time. Example i get an apple, its now id 1, you get an apple its now id 2. so search for `nameid`
  12. Yes it does exactly that. Atleast it's supposed to. I have not tested the script, so if you would like to use it, i'm eager to here the results.
  13. Okay lol. I got what you were saying, I just thought maybe you didn't know the possibilities an existing command. But I agree, simpiler is better in some cases.
  14. I wouldn't think so. - script test_npc -1,{ OnInit: bindatcmd("@storage","test_npc::OnStorage"); end; OnStorage: set .@maps$[0],"prontera","payon","alberta","etc..."; getmapxy(.@m$,.@x,.@y,0); for(set .@i,0; .@i<getarraysize(.@maps$); set .@i,.@i+1) {if(.@m$==.@maps$[.@i]){dispbottom "@storage is disabled on this map."; end;}} openstorage; end; } Personally, I just think that using the bindatcmd script command is better since it is more versatile. Your basically free to put any pre-requisists for using a command/limitations for using one while using the script. Example: Limit @warp to only work during 18:00 -> 00:00. Or making @storage only useable 5->10x a day, then after that charge them zeny or an item to use it further past that amount/time. There really is limitless possibilities, just depends on your imagination.
  15. @Emistry Yea I know lol, but i merely just Copy&Pasted your existing script and made changes/additions. Didn't feel like replacing the variables since it wasn't my script to begin with lol.
  16. prontera,155,181,5 script Sample 45,2,2{ end; OnTouch: if( @Count < 300 ){ dispbottom "Killed "+@Count+"/300 Poring."; end;} warp "map_name",x,y; end; OnPCLoginEvent: set @Count,Count; set Count,0; end; OnPCLogoutEvent: set Count,@Count; end; OnNPCKillEvent: if( killedrid == 1002 && @Count < 300 ){ set @Count,@Count + 1; dispbottom "Killed "+@Count+"/300 Poring."; } end; }
  17. Hmm, I'm not saying it "shouldn't" be added, but we already currently have something like it. *bindatcmd "command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>}; *bindatcmd("command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>}); This command will bind a NPC event label to an atcommand. Upon execution of the atcommand, the user will invoke the NPC event label. With this you can litterally do the exact same thing, and make it so player's can't use the command on certain maps. Additionally we have with i. *unbindatcmd "command"; *unbindatcmd("command"); This command will unbind a NPC event label from an atcommand. So, you can pretty much make atcommands only accessible after meeting requirements and so on.
  18. Edit: Look at post below, it gives a bit of advice on how to build the script. P.S: I'm sure there are simliar scripts/topics floating around here in rAthena. And if not, i'm 100% positive there are some in eAthena's old forums.
  19. So, your warper will block players from warping into the dungeon unless they complete a quest first?
  20. Your welcome. Some feed back on whether it worked or not would be very much appreciated, as it would help to further my understanding of the src code.
  21. Um your error is your not setting the values when needed. It should be like this if i'm not mistaken: query_sql"UPDATE `char` SET `hair`='0', `hair_color`='0', `clothes_color`='0' WHERE `name`='Testchar'"; //OR query_sql"UPDATE `char` SET `hair`='0', `hair_color`='0', `clothes_color`='0' WHERE `name`='"+strcharinfo(0)+"'"; //OR query_sql"UPDATE `char` SET `hair`='0', `hair_color`='0', `clothes_color`='0' WHERE `name`='"+string_variable$+"'";
  22. I could write up a script to reduce the load by simply making it only ping SQL for information when they logout/in OR on first kill of that mob. But, that would mean storing most information into a variable/array. And as Euphy pointed out to me earlier today (since i forgot), Arrays can only hold upto 128 values. So either I would need to make multiple arrays/variables, or store the information into 1array using bit format, thus saving space and the load, but making the script very un-user friendly as only advanced/expert scripters would know how to make changes. Edit: Though now that I think about it, you can't make this script 100% bug proof with script commands only. You would need a src edit. Because at the moment there is no possible way to detect if a player got a drop from a monster. You see in my script, i detect if an item drops at 100%, if it does, it deletes it. But i can't detect if it dropped at 1% and you got it. I could easily delete 1 of each item the mob will drop regardless, so, if they have it in their inventory its gone. Thing is though, if it didn't drop, they will be -1 of the item, and the chance of them getting it back depends on how many they killed OR just pure luck if its the first kill since you added in this script. Edit2: - script CustomDropRates -1,{ OnInit: //Whether or not the script is Map Exclusive set $@CDR_mode,1; // 0 = Disabled | 1 = Enabled setarray $@MapOkay$[0],"Enter","Map","Names","Here"; end; OnPCLoginEvent: iLoop: //Incase there are more than 128 different mobs killed. set .@total,(query_sql"SELECT `mob_id`,`kills` FROM `custom_drop_rate` WHERE `kills`>='1' LIMIT 128",@CDR_id,@CDR_kills); for(set .@i,0; .@i<.@total; set .@i,.@i+1) {setd "@cdr_id_"+.@j+"["+.@i+"]",@CDR_id[.@i]; setd "@cdr_kills_"+.@j+"["+.@i+"]",@CDR_kills[.@i];} if(.@total<128){end;} set .@j,.@j+1; set @j,.@j; //Stores information for later use. goto iLoop; //Loops back to create another temporary array if there are more than 128 mobs. end; OnPCLogoutEvent: set .@a,@j; iLoop2: if(.@j>=.@a) {set .@send$,"))"; set .@query$,.@query$ + .@send$; query_sql""+.@query$+""; end;} set .@query$,"(REPLACE INTO `custom_drop_rate` VALUES("; for( set .@i,0; getarraysize(getd("@cdr_kills_"+.@j+"")); set .@i,.@i+1) {if(.@i>0){set .@query$, .@query$ +",";} set .@query$, .@query$ + "'"+ getd("@cdr_kills_"+.@j+"["+.@i+"]") +"'";} set .@j,.@j+1; goto iLoop2; end; OnNPCKillEvent: set @mobid,killedrid; if($@CDR_mode) {getmapxy(.@m$,.@x,.@y,0); for(set .@i,0; .@i<getarraysize($@MapOkay$[0]); set .@i,.@i+1) {if( .@m$ == $@MapOkay$[.@i] ){callfunc "DropItemRate";}} end;} callfunc "DropItemRate"; end; } function script DropItemRate { set @i,0; set @dropID,0; deletearray $@MobDrop_item[0],128; deletearray $@MobDrop_rate[0],128; getmobdrops(@mobid); if(!$@MobDrop_count){end;} set .@count,$@MobDrop_count; copyarray .@MobDrop_item[0],$@MobDrop_item[0],.@count; copyarray .@MobDrop_rate[0],$@MobDrop_rate[0],.@count; iForLoop: //This where we will get our monster's kill count. AND Updates it +1. if(.@a >= @j && .@kd==1){goto iDropItemLoop;} //Adds the monster to the database if its the first kill. And continues as normal. if(.@a >= @j && .@kd!=1) {query_sql"INSERT INTO `mob_id`,`kills` VALUES('"+@mobid+"','1') FROM `custom_drop_rate` WHERE `char_id`='"+getcharid(0)+"'"; goto iDropItemLoop;} for(set .@j,0; .@j<getarraysize(getd("@cdr_id_"+.@a+"")); set .@j,.@j+1;) {if( getd("@cdr_id_"+.@a+"["+.@j+"]") == @mobid ) {setd "@cdr_kills_"+.@a+"["+.@+"]",(getd("@cdr_kills_"+.@a+"["+.@j+"]")+1); set .@kills,getd("@cdr_kills_"+.@a+"["+.@j+"]"); set .@kd,1; goto iDropItemLoop;}} set .@a,.@a+1; goto iForLoop; end; iDropItemLoop: set @i,rand(1,10000); if(@dropID == .@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;} i//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 - Remeber that with current script commands we can't detect if a player recieved an item from a monster if its not 100% drop rate. How it works. Player Logs in -> Gets info from SQL -> stores information in variables -> player kills monster -> retrives kill count->updates kill count ->(if haven't killed the monster before-> add info to SQL ->) calculates drops -> gives items
  23. O.o; Then where the hell did i get the value of 256.... Maybe from my military work lol, 8months on learning internet protocol for 16hours a day probably did it for me @.@
  24. Oh yea sorry lol, forgot about that xD. Your right lol. Looks like i forgot that as well... Well, you can look around or google how to do it, its not too hard. It'll be a good learnign experience.
  25. In order to use an AoE Freeze & Stone curse effect, there needs to already be a skill which does it. I know AoE Freeze is Frost Misty i believe. Don't know about AoE Stone Curse. So for now, make it autospell Frost Misty skill (Warlock).
×
×
  • Create New...