Zerobaum Report post Posted December 21, 2006 I need help getting a bot to go to Votd. near the gold mine for testing. i dont know how to find the ITEM name to use. such as a banner on a boat to travel. i see how they did the IP and underworld but ive tried to get it to go to Desert pines and votd. but i cant seem to find the right "item" number for the banners. Share this post Link to post Share on other sites
Tuver Report post Posted December 21, 2006 you have to go into the map editor and look it up there Share this post Link to post Share on other sites
Zerobaum Report post Posted December 21, 2006 Hmm how so? as if i was going to find the "desert pines boat flag" how can itell the Id number. and i cant figure out how the Pk_list works. it set my alt as a member that he should be attacked on sight etc. but the bot sits there and doesnt do anything. and any clue how to command him to retreive a bag? Share this post Link to post Share on other sites
Tuver Report post Posted December 22, 2006 (edited) in the map editor just go to the item in question and click on it, then you get this window that pops up with it's information. for the redknight program it's the object ID you want to know as for the bag command. there is no command to tell him to "get bag" once the bot reaches his home he should retieve any bag in his sight automatically, if not something is wrong. Edited December 22, 2006 by Tuver Share this post Link to post Share on other sites
Zerobaum Report post Posted December 22, 2006 Ah ok thanks so much. any other specific commands i should know or are a good idea to know? Share this post Link to post Share on other sites
nathanstenzel Report post Posted December 23, 2006 #beam me (and various other # commands) some commands don't work as expected (they give an error), just stick 0x20 on the end and it will work fine. Thanks, LabRat. Now, I can get a few more commands working on Trismegitus (ALCH guild bot). The only question is, how do you deal with the multiple part messages like the #exp and #sto? Share this post Link to post Share on other sites
LabRat Report post Posted December 23, 2006 For commands that you don't send a parameter for (eg #arm), put a trailing space on the end. For commands that do have a parameter (eg #beam me, #sto ore) just send the command as is. Share this post Link to post Share on other sites
nathanstenzel Report post Posted December 25, 2006 (edited) For commands that you don't send a parameter for (eg #arm), put a trailing space on the end. For commands that do have a parameter (eg #beam me, #sto ore) just send the command as is. I tried with and without the 0x20. I have not looked at an asci chart for ages, but that is a space, right? "#list_guild alch" does require the 0x20 to be added to the end. I have tried other commands with the 0x20 added to the end. It seems that it is ok to add an 0x20 to the end of any #command. Have you found out of any commands that can't have one at the end? Edited December 27, 2006 by nathanstenzel Share this post Link to post Share on other sites
Vegar Report post Posted December 27, 2006 A space isn't required, it's just the server that's being stupid, it doesn't understand the \0. If you don't send the \0, you don't need the space either. (IIRC) Share this post Link to post Share on other sites
Quimbly Report post Posted December 28, 2006 anyone know how to change the message where this bot says "only IRON and her allies are allowed"? its coming from the redknight.exe file Share this post Link to post Share on other sites
bkc56 Report post Posted December 28, 2006 anyone know how to change the message where this bot says "only IRON and her allies are allowed"? its coming from the redknight.exe file Yes, you have to edit the source and re-compile. The sentence is hard-coded (not configurable). There are a couple such messages where it talks about the guild IRON or talks about a cave (not all guild maps are caves). Those all have to be changed in the source. Share this post Link to post Share on other sites
LabRat Report post Posted December 28, 2006 send_raw_text("Sorry, only %s and her allies are permitted to pass. If you take one step or do not leave within %d seconds you will be PKed!",my_guild,(attack_delay/1000)); //Greeting, name, greeting message One press of Ctrl-F9, .exe placed gracefully on one of my sites and the problem is solved. Share this post Link to post Share on other sites
Greypal Report post Posted June 30, 2008 (edited) i dealt with that code now for a couple of hours and still fixing stuff. the problem with the cast are that there is code to check if enough essences are in the inventory, but the code wont work when the bot does not have any of the required essences. for(i = 0; i < 36; i++) { ..if(!strncmp(inv.name, "Health Essence", 14)) { ....// this line would never be reached if there are no health essences at all, because the compare wont found something if it is not here ....if(inv.quantity < 40) ......send_raw_text("#gm %cI am running low on health ess. Please bring some soon!", 127+c_red1); ....else if (inv.quantity < 20) ......send_raw_text("#gm %cI am almost out of health ess. Please bring some quick!", 127+c_red2); ....else if (inv.quantity == 0) ......send_raw_text("#gm %cI am OUT of health ess and can not restore! Please bring some NOW!!", 127+c_red3); ..} } that is the problem with all those constructs they will not notice when the required item is not in inv at all, will provide improvements/diffs for that the construct should look like fit=0; // preset founditem to 0 for(i = 0; i < 36; i++) { ..if(!strncmp(inv.name, "Health Essence", 14)) { ....fit=inv.quantity; // set the found item variable with the quantity in inv ..} } // changed also the order of check, in the old version only "<40" was true for all cases, cause it was checked first if (fit == 0) ..send_raw_text("#gm %cI am OUT of health ess and can not restore! Please bring some NOW!!", 127+c_red3); else if (fit < 20) ..send_raw_text("#gm %cI am almost out of health ess. Please bring some quick!", 127+c_red2); else if(fit < 40) ..send_raw_text("#gm %cI am running low on health ess. Please bring some soon!", 127+c_red1); will also add the found code changes to my copy will eventually turn all those code in a generic function, cause it is used very often Edited June 30, 2008 by Greypal Share this post Link to post Share on other sites