Get character slot
Get character slot
Hi, I know you can get the name of the current player using player.Name. Is it possible to retrieve the slot number (1-8) of the current player?
Re: Get character slot
You mean on the character selection screen?ratzuk wrote:Hi, I know you can get the name of the current player using player.Name. Is it possible to retrieve the slot number (1-8) of the current player?
Try
Code: Select all
CharacterSelectListScrollBar:GetValue() + 1
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Get character slot
No, not on the character selection screen, while the bot is running.
I'll explain what I am trying to do:
I use the autologin (Loginxml) to run the Elven daily for tokens on an account with 8 characters using random character names. I would like the bot to give an indication of it's progress by outputting the current slot number to the bot window as it progresses.
Such as:
Where <BotNumber> is the current character slot
Thanks
I'll explain what I am trying to do:
I use the autologin (Loginxml) to run the Elven daily for tokens on an account with 8 characters using random character names. I would like the bot to give an indication of it's progress by outputting the current slot number to the bot window as it progresses.
Such as:
Code: Select all
printf("Bot"..<BotNumber>.." Completed "..dailyQuestCount.." from " .. dailyQuestsPerDay .. " daily quests, now " .. dailyQuestsPerDay - dailyQuestCount .. " remain.");
Thanks
Re: Get character slot
I didn't mean at the selection screen(how can you enter a command there anyway?). I was asking you if you meant you wanted to know which character you are playing from the character selection screen because I didn't now what you meant by "character slot"?ratzuk wrote:No, not on the character selection screen, while the bot is running.
I just rechecked it, it looks like I was wrong anyway. It doesn't work.
Had another look and found
Code: Select all
CHARACTER_SELECT.selectedIndex
One of these days I gotta update AutoLogin. It's on my todo list.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Get character slot
No I want to know the character number from within the bot itself so it can report how far through the available characters it is (1-8)rock5 wrote:I was asking you if you meant you wanted to know which character you are playing from the character selection screen
What i need to know is how to send the value of:
Code: Select all
CHARACTER_SELECT.selectedIndex
Code: Select all
<waypoint x="31845" z="4588">
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 10 == dailyQuestCount then
printf("Completed "..dailyQuestCount.." from " .. dailyQuestsPerDay .. " daily quests. Change character.");
sendMacro("}LoginNextToon=true;a={")
sendMacro("Logout();"); yrest(60*1000) -- wait 1m for next character to load
-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile("default"); -- Profile name
yrest (4000)
loadPaths("Elven Island/Daily"); -- First script
else
printf("Bot "..CHARACTER_SELECT.selectedIndex.." Completed "..dailyQuestCount.." from " .. dailyQuestsPerDay .. " daily quests, now " .. dailyQuestsPerDay - dailyQuestCount .. " remain.");
end
player:target_NPC("Blinsik");
sendMacro("OnClick_QuestListButton(1, 2)"); yrest(750);
sendMacro("AcceptQuest()"); yrest(2000);
</waypoint>
Code: Select all
[string "..."]:16: attempt to index global 'CHARACTER_SELECT' (a nil value)
Re: Get character slot
That's what I meant. I know what your asking but obviously I'm not making myself clear. Anyway, let's just move on.ratzuk wrote:No I want to know the character number from within the bot itself so it can report how far through the available characters it is (1-8)
You do it as you would normally do to get a value from the game,ratzuk wrote:What i need to know is how to send the value of:back to the bot in some wayCode: Select all
CHARACTER_SELECT.selectedIndex
Code: Select all
RoMScript("CHARACTER_SELECT.selectedIndex")
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Get character slot
Thanks rock5. All working nowrock5 wrote: You do it as you would normally do to get a value from the game,You were treating it as a rombot variable which it isn't. That's why you got the error.Code: Select all
RoMScript("CHARACTER_SELECT.selectedIndex")

Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests