auto-open gift bag on level?
Posted: Thu Sep 10, 2009 1:07 pm
hello, im asking if its possible to set, when u level up it will auto open a gift bag.
MicroMacro home
https://www.solarstrike.net/phpBB3/
Yes. Update to the current SVN version. There is a demo profile 'l1-10.xml'. There you find:imartynasi wrote:hello, im asking if its possible to set, when u level up it will auto open a gift bag.
Code: Select all
<onLeaveCombat>
-- thats a demo for opening the gift bags from Lvl 1-10
-- and levelup the skills for a new mage character
-- you can delete that lines
if( player.Level > player.free_counter1) then
player.free_counter1 = player.Level;
-- open giftbag and equipt content
-- updates first 18 bag slots / update all if empty
openGiftbag(player.Level, 18);
-- levelup skills
-- mage: 4 = third skill tab, 2 = mage flame
-- priest: 2,1 (rising tide) 2,2 (urgent heal)
-- CAUTION: addressing a invalid skill will crash the RoM client
if(player.Class1 == CLASS_MAGE) then
if( player.Level == 2 ) then
sendMacro("SetSpellPoint( 4, 2 );");
yrest(1000);
sendMacro("SetSpellPoint( 4, 2 );");
else
player.free_counter1 = player.Level;
sendMacro("SetSpellPoint( 4, 2 );");
end
end
end
Code: Select all
openGiftbag(player.Level, 18);
Code: Select all
openGiftbag();
I think openGiftbag(); should be inventory:openGiftbag() since its an inventory function, don't you think?d003232 wrote:now works for all classes from lvl 1 - 10.Code: Select all
openGiftbag();
Yes. That would be a good idea. I suppose users will ask to open higher level gift bags too. If we move it ... and if we add giftbags greater lvl 10, then we should add a option to only open the bag and not to eqipt something. Now the function is very specialiced in supporting the automatic leveling from 1-10.droppen wrote:I think openGiftbag(); should be inventory:openGiftbag() since its an inventory function, don't you think?d003232 wrote:now works for all classes from lvl 1 - 10.Code: Select all
openGiftbag();