Rock5's Mail Mods
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Re: Rock5's Mail Mods
Hi,
Is it possible to write a mail with the bot including a message?
All functions I found was always sending Money or Item but never an message.
But i Need to send a message.
can you help me?
Is it possible to write a mail with the bot including a message?
All functions I found was always sending Money or Item but never an message.
But i Need to send a message.
can you help me?
Re: Rock5's Mail Mods
You would have to use the second tab to send a message but the UMM functions don't use the second tab at all so it wouldn't be easy. Why do you need it?
- 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: Rock5's Mail Mods
I have so many accounts that I want to send a mail to my main how many belts Manastones and Magicboxenergy i have on the characters.
I would like to send a Mail in which the values are
I would like to send a Mail in which the values are
Re: Rock5's Mail Mods
Cluttering up your main mailbox and having to log into your main to get your mail is a hassle. Have you considered just using a log file? Then you would have all the information in 1 easy to access location. Maybe should look at Lisas logging userfunction that helps simplify it. http://solarstrike.net/phpBB3/viewtopic ... 979#p39979
- 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: Rock5's Mail Mods
I have seen her Userfunction and already download it.
I will use it for sure i wanted only to now if the mail would be possible.
But you are right ist better to use the logger.
Thanks a lot for your help always.
One more question.
Where do you get always the Romscript() functions?
I will use it for sure i wanted only to now if the mail would be possible.
But you are right ist better to use the logger.
Thanks a lot for your help always.
One more question.
Where do you get always the Romscript() functions?
Re: Rock5's Mail Mods
The rom wiki has a list of functions http://www.theromwiki.com/List_of_Functions. I also use the fdbextractor https://github.com/McBen/FDB_Extractor2/downloads to extract the worldxml folder from the interface.fdb file which has a lot of code where I can search for functions.
- 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: Rock5's Mail Mods
interestingly when I extracted from there files for me here suchrock5 wrote:The rom wiki has a list of functions http://www.theromwiki.com/List_of_Functions. I also use the fdbextractor https://github.com/McBen/FDB_Extractor2/downloads to extract the worldxml folder from the interface.fdb file which has a lot of code where I can search for functions.
Re: Rock5's Mail Mods
You don't show which file you tried to open. In the worldxml folder there should be mostly just xml and lua files. They should all be text files and be able to be opened by any text editor.
- 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: Rock5's Mail Mods
UMM_SendFusionStones
Function for send Fusion Stones with too and one stats.
code example for waypoint:
UMM_SendFusionStones(_recipient, _stoneID, _stats, _amount)
_recipient - Who you are sending to.
_stoneID - Name or id of the stones you want to send or a table of names and ids.
_stats - stat, stats table or table of tables stats for stones you want to send.
_amount - The number of stones you want to send.
Examples:
Function for send Fusion Stones with too and one stats.
code example for waypoint:
Code: Select all
<onLoad>
-- MailSenders Names
MailSender1 = "Charnica" <!-- Name of Mail Sender 1 -->
-- Names table of Fusion Stones with stats Receiver
StonesReceiver = {"Charetov", --
"Charetovi", --
"Charetovu", --
"Charetove", --
"Charetovy", --
"Charetovv", --
}; <!-- Names table of Stone Receiver -->
-- Stats tables.
-- 0 Выносливость
StatsTables0 = {510360}
-- 1 Выносливость + ( Сила, Ловкость, Интелект),
StatsTables1 = { {510360, 510380}, {510360, 510060}, {510360, 510320}, };
-- 2 Выносливость + Мудрость, Все параметры, Защита от всех стихий,
StatsTables2 = { {510360, 510340}, {510360, 510300}, {510360, 510560}, };
-- 3 Устойчивость: к Земле, к Воде, к Огню,
StatsTables3 = { {510360, 510500}, {510360, 510440}, {510360, 510460}, };
-- 4 Устойчивость: к Ветру, к Свету, к Тьме,
StatsTables4 = { {510360, 510520}, {510360, 510480}, {510360, 510540}, };
-- 5 Магическая атака, Физическая атака, Максимум здоровья
StatsTables5 = { {510360, 510400}, {510360, 510100}, {510360, 510020}, };
-- 6 Максимум маны, Магическая защита, Физическая защита,
StatsTables6 = { {510360, 510040}, {510360, 510420}, {510360, 510120}, };
</onLoad>
<!-- # 12 --><waypoint x="-43" z="615" y="7" tag="GuildFortressMailbox">
-- Open Mailbox
player:target_Object(113043); yrest(500); -- Почтовый ящик гильдии
RoMScript("ChoiceOption(1);"); yrest(1000);
-- Send Stones
UMM_SendFusionStones(StonesReceiver[1], 203001, StatsTables0) -- Одностатные Камни соединения
UMM_SendFusionStones(StonesReceiver[1], 203001, StatsTables1) -- Двухстатные Камни соединения
UMM_SendFusionStones(StonesReceiver[2], 203001, StatsTables2) -- Двухстатные Камни соединения
UMM_SendFusionStones(StonesReceiver[3], 203001, StatsTables3) -- Двухстатные Камни соединения
UMM_SendFusionStones(StonesReceiver[4], 203001, StatsTables4) -- Двухстатные Камни соединения
UMM_SendFusionStones(StonesReceiver[5], 203001, StatsTables5) -- Двухстатные Камни соединения
UMM_SendFusionStones(StonesReceiver[6], 203001, StatsTables6) -- Двухстатные Камни соединения
UMM_SendByStatNumber(MailSender1, 3) -- Трехстатные Камни соединения
</waypoint>
-- Stat table.
510020 "Жизнь I", "Life I"
510040 "Заклятье I", "Spell I"
510060 "Сноровка I", "Dexterity I"
510100 "Повеление I", "Command I"
510120 "Твердость I", "Solidity I"
510140 "Меткость I", "Accuracy I"
510200 "Уклонение I", "Dodge I"
510300 "Умение I", "Ability I"
510320 "Интеллект I", "Intellect I"
510340 "Дух I", "Spirit I"
510360 "Выносливость I", "Stamina I"
510400 "Энергия I", "Energy I"
510420 "Заграждение I", "Barricade I"
510440 "Туман I", "Mist I"
510460 "Пламя I", "Flame I"
510480 "Свет I", "Light I"
510500 "Земля I", "Earth I"
510520 "Дуновение I", "Whiff I"
510540 "Тьма I", "Dark I"
510560 "Стихия I", "Element I"
510820 "Скорость I", "Speed I"
510840 "Клык I", "Fang I"
510860 "Реакция I", "Reflex I"
510880 "Ловкость I", "Agility I"
510900 "Точность I", "Precision I"
510920 "Соблюдение I", "Observance I"
510940 "Сообразительность I", "Keen I"
Code: Select all
-- Stats tables on English for send Fusion Stones with too and one stats.
-- 0. Stamina I,
StatsTables0 = {510360}
-- 1. Stamina I + ( Strength I, Dexterity I, Intellect I ),
StatsTables1 = { {510360, 510380}, {510360, 510060}, {510360, 510320}, };
-- 2. Stamina I + Spirit I, Ability I, Element I ,
StatsTables2 = { {510360, 510340}, {510360, 510300}, {510360, 510560}, };
-- 3. Stamina I + ( Earth I, Mist I, Flame I),
StatsTables3 = { {510360, 510500}, {510360, 510440}, {510360, 510460}, };
-- 4. Stamina I + ( Whiff I, Light I, Dark I ),
StatsTables4 = { {510360, 510520}, {510360, 510480}, {510360, 510540}, };
-- 5. Stamina I + ( Energy I, Command I, Life I ),
StatsTables5 = { {510360, 510400}, {510360, 510100}, {510360, 510020}, };
-- 6. Stamina I + ( Spell I, Barricade I, Solidity I ),
StatsTables6 = { {510360, 510040}, {510360, 510420}, {510360, 510120}, };
_recipient - Who you are sending to.
_stoneID - Name or id of the stones you want to send or a table of names and ids.
_stats - stat, stats table or table of tables stats for stones you want to send.
_amount - The number of stones you want to send.
Examples:
Code: Select all
UMM_SendFusionStones("Receiver", 203001, 510360) -- Send Stones with one stat
Code: Select all
UMM_SendFusionStones("Receiver", 203001, {510360, 510380}) -- Send Stones with too stat
Code: Select all
UMM_SendFusionStones("Receiver", 203001, { {510360, 510040}, {510360, 510420}, {510360, 510120}, }) -- Send Stones with table of stats
- Attachments
-
- addon_Rock5s_Mail_Functions.lua
- (34.61 KiB) Downloaded 357 times
Re: Rock5's Mail Mods
It doesn't look like you followed the structure of the existing functions. The way it is set up is new functionality is added to the UMM_SendAdvanced function then simpler functions can be created that use the advanced function. It looks like you duplicated the advanced function and modified it to make your own. What you should have done is added the stats as an extra argument to the advanced function then create your fusion function like this (simplified)
The reason I did it that way with the advanved function is so that custom functions can be made that use any mix of the search terms. By putting the fusion stats function separate it can't be included in a new custom function. For instance if you added stat name searches to the advanced function someone else could do a search for weapons with certain stats. I think all you need to do is add stat names as an extra argument to SendAdvanced. Everything else you need is already there; name, amount, type.
Code: Select all
function UMM_SendFusionStones(_recipient, _stoneID, _stats, _amount)
UMM_SendAdvanced(_recipient,{_stoneID},nil,nil,nil,nil,nil,nil,_amount,nil,nil,_stats)
end
- 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: Rock5's Mail Mods
I add new functionality to the UMM_SendAdvanced function.
Now it can send any unbounded items by stats.
Now it can send any unbounded items by stats.
- Attachments
-
- addon_Rock5s_Mail_Functions.lua
- (31.6 KiB) Downloaded 359 times
Re: Rock5's Mail Mods
Looks good. Can you give an example in each way it can be used?
- 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: Rock5's Mail Mods
Waypoint example for send fusion stone with 1 and 2 stat.
Stone with 3 stat sends but without checking stats.
Fusion stone sender must be in Guild with guild fortress Mailbox and stay near NPC Odeley Prole in Varanas.
Stone with 3 stat sends but without checking stats.
Fusion stone sender must be in Guild with guild fortress Mailbox and stay near NPC Odeley Prole in Varanas.
- Attachments
-
- 2_stat_stone.xml
- (6.58 KiB) Downloaded 377 times
Re: Rock5's Mail Mods
So it only matches exact matches? For instance
only matches fusion stones with 510360 and 510040 or 510360 and 510420 or 510360 and 510120? Seems a bit limiting. What if you just want to send all fusion stones with 1 Stamina stat with a maximum of 2 stats? You can't do that with the way you set it up. I would have made it so it just has to match the stats then used the _statNo arg as an optional argument. Eg.
would send all fusion stones that include those stats
would send all fusion stones that match those stats and has maximum number of stats _statNo.
I think like this, you could get the same result but makes it a bit more versatile.
Hm... or maybe not. _statNo means "maximum number of stats". You want "exact number of stats" because you want to send fusion stones with 1 stat to one recipient and 2 stats to other recipients. I really should have made it _maxStatNo and _minStatNo. Now it's not so easy to add. You can't just insert it because it would make the function incompatible. If you add it on the end then it would look funny having the max arg in the middle and the min arg on the end. I guess _statNo could be made to optionally accept a table of 2 number, the minimum and maximum stats. eg.
Hm.... What do you think?
Code: Select all
UMM_SendFusionStones("Receiver", 203001, { {510360, 510040}, {510360, 510420}, {510360, 510120}, })
Code: Select all
UMM_SendFusionStones("Receiver", 203001, _stats)
Code: Select all
UMM_SendFusionStones("Receiver", 203001, _stats, _statsNo)
I think like this, you could get the same result but makes it a bit more versatile.
Hm... or maybe not. _statNo means "maximum number of stats". You want "exact number of stats" because you want to send fusion stones with 1 stat to one recipient and 2 stats to other recipients. I really should have made it _maxStatNo and _minStatNo. Now it's not so easy to add. You can't just insert it because it would make the function incompatible. If you add it on the end then it would look funny having the max arg in the middle and the min arg on the end. I guess _statNo could be made to optionally accept a table of 2 number, the minimum and maximum stats. eg.
Code: Select all
if type(_statNo) == "number" then
--- do what it does now
elseif type(_statNo) == "table" then
if #_slotitem.Stats < _statNo[1] or #_slotitem.Stats > _statNo[2] then
return false
end
end
- 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: Rock5's Mail Mods
Function UMM_SendFusionStones can send stones with different stats number to one recipient and code for find stats itself check stats number. I think optional argument is no need.
Code: Select all
UMM_SendFusionStones("Receiver", 203001, { {510360,}, {510360, 510420}, {510360, 510120, 510040}, })
Re: Rock5's Mail Mods
So if I want to send every 2 stat fusion stone with a Stamina I I have to use.
Wouldn't it be nice if you could do
Code: Select all
UMM_SendFusionStones("Recipient", 203001, { {510360, 510380}, {510360, 510060}, {510360, 510320}, {510360, 510340}, {510360, 510300}, {510360, 510560}, {510360, 510500}, {510360, 510440}, {510360, 510460}, {510360, 510520}, {510360, 510480}, {510360, 510540}, {510360, 510400}, {510360, 510100}, {510360, 510020}, {510360, 510040}, {510360, 510420}, {510360, 510120}, };
Code: Select all
UMM_SendFusionStones("Recipient", 203001, {510360}, 2)
- 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: Rock5's Mail Mods
hello i know this is not a problem of your script but of the mode but for some reason it bugs when mass sending items for example sending 180 fusion stones.
even if i send in stacks of 30, (send 30, receive them with the other char and so on), after 3-4 tries, it refuses to send and bugs, and the only fix i found is to log out and log in.
any ideas why ?
even if i send in stacks of 30, (send 30, receive them with the other char and so on), after 3-4 tries, it refuses to send and bugs, and the only fix i found is to log out and log in.
any ideas why ?
Re: Rock5's Mail Mods
Server limit for sand mail is 60. For reset change location or relog.hangman04 wrote:hello i know this is not a problem of your script but of the mode but for some reason it bugs when mass sending items for example sending 180 fusion stones.
even if i send in stacks of 30, (send 30, receive them with the other char and so on), after 3-4 tries, it refuses to send and bugs, and the only fix i found is to log out and log in.
any ideas why ?
Code: Select all
-- Selecting and Send Item
player:target_Object(123006); -- Почтовый ящик
RoMScript("ChoiceOption(1);"); yrest(1500);
UMM_DeleteEmptyMail();
if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 )
or ( 8 > inventory:itemTotalCount(202999) and 8 > inventory:itemTotalCount(203001)
and CheckTierItems() >= 8 ) then
UMM_TakeMail(); yrest(4000);
RoMScript("CloseWindows()"); yrest(500); inventory:update();
player:target_Object(123006); -- Почтовый ящик
RoMScript("ChoiceOption(1);"); yrest(1500);
end
BagSpaceS = inventory:itemTotalCount(0); BotsendedS = 0;
UMM_SendByFusedTierLevel(Recipient, 5, 8); yrest(500) -- 8 штук шмоток для тира
UMM_SendByNameOrId(Recipient, 203276, 1); yrest(500) -- Шар опыта: 10 000 очков
BotSendedMail = BotSendedMail + 9; BotsendedS = BotsendedS + 9;
if( 8 > inventory:itemTotalCount(202999) and 8 > inventory:itemTotalCount(203001) and CheckTierItems() >= 8 ) then
UMM_TakeMail(); yrest(4000);
RoMScript("CloseWindows()"); yrest(500); inventory:update();
player:target_Object(123006); -- Почтовый ящик
RoMScript("ChoiceOption(1);"); yrest(1500);
BagSpaceS = inventory:itemTotalCount(0); BotsendedS = 0;
end
if( 8 > inventory:getItemCount(202999) and 8 > inventory:getItemCount(203001) )then -- Проверить наличие камней
-- UMM_SendMoney(Recipient, 92000); -- Если камней нету то Послать денег
UMM_SendMoney(Recipient, 15840); -- Если камней нету то Послать денег
BotSendedMail = BotSendedMail + 1; BotsendedS = BotsendedS + 1;
else
if( inventory:getItemCount(202999) >= 8 )then
UMM_SendByNameOrId(Recipient, 202999, 8); yrest(500) -- Случайный камень соединения
BotSendedMail = BotSendedMail + 8; BotsendedS = BotsendedS + 8;
else
UMM_SendByNameOrId(Recipient, 203001, 8); yrest(500) -- Камень соединения с Выносливость и произвольными
BotSendedMail = BotSendedMail + 8; BotsendedS = BotsendedS + 8;
end
end
RoMScript("CloseWindows()"); yrest(500); inventory:update();
BagSpaceS = inventory:itemTotalCount(0)+2 - BagSpaceS
Code: Select all
-- Player ReLogin for mail unblock
cprintf(cli.white, player.Name.." BotSendedMail: %s, BotsendedS: %s, BagSpaceS %s\n", BotSendedMail, BotsendedS, BagSpaceS)
if ( BotSendedMail >= 50 or BotsendedS > BagSpaceS ) then
cprintf(cli.white, player.Name.." ReLogin for mail unblock.\n")
BotSendedMail = 0
ChangeChar("current");
end
Re: Rock5's Mail Mods
The userfunction is supposed to detect the problem and relog for you. Is it not doing it?
- 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: Rock5's Mail Mods
New Update.
Rewrite code for select and send items by Stats,
and add new function UMM_SendByStats(_recipient, _itemTable, _stats, _statNo, _amount).
Function UMM_SendFusionStones() was removed* Use UMM_SendByStats().
_recipient - Who you are sending to.
_itemTable - Name or id of the items you want to send or a table of names and ids.
_stats - stat, stats table or table of tables stats for items you want to send.
_statNo - Number of "named stats" which must contain item. From 1 to 6. Does not include inherent stats and runes.
_amount - The number of items you want to send.
Examples:
You can send by Stats any items not only Fusion or Mana Stones.
Rewrite code for select and send items by Stats,
and add new function UMM_SendByStats(_recipient, _itemTable, _stats, _statNo, _amount).
Function UMM_SendFusionStones() was removed* Use UMM_SendByStats().
_recipient - Who you are sending to.
_itemTable - Name or id of the items you want to send or a table of names and ids.
_stats - stat, stats table or table of tables stats for items you want to send.
_statNo - Number of "named stats" which must contain item. From 1 to 6. Does not include inherent stats and runes.
_amount - The number of items you want to send.
Examples:
Code: Select all
UMM_SendByStats("recipient", 203001, 510360) -- Send Fusion Stones with one stat Stamina I.
Code: Select all
UMM_SendByStats("recipient", 203001, {510360, 510380}) -- Send Fusion Stones with too stat Stamina I + Strength I.
Code: Select all
UMM_SendByStats("recipient", 203001, { {510360, 510040}, {510360, 510420}, {510360, 510120}, }) -- Send Fusion Stones with table of stats.
Code: Select all
UMM_SendByStats("recipient", 203001, 510340, 2) -- Send Fusion Stones with too stats which contain stat Spirit I.
Code: Select all
UMM_SendByStats("recipient", 203001, {{510060},{510320}}, 2, 8) -- Send 8 Fusion Stones with too stats which contain stat Dexterity I or stat Intellect I.
- Attachments
-
- addon_Rock5s_Mail_Functions.lua
- (33.74 KiB) Downloaded 336 times
Who is online
Users browsing this forum: No registered users and 1 guest