auto-open gift bag on level?
-
- Posts: 19
- Joined: Thu Sep 10, 2009 8:32 am
auto-open gift bag on level?
hello, im asking if its possible to set, when u level up it will auto open a gift bag.
Re: auto-open gift bag on level?
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);
The RoM Bot Online Wiki needs your help!
Re: auto-open gift bag on level?
Code: Select all
openGiftbag();
The RoM Bot Online Wiki needs your help!
-
- Posts: 19
- Joined: Thu Sep 10, 2009 8:32 am
Re: auto-open gift bag on level?
i had updated with SVN, but then bot not worked for me, so i downloaded and replaced everything, and now works without SVN
Re: auto-open gift bag on level?
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();
Re: auto-open gift bag on level?
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();
The RoM Bot Online Wiki needs your help!
Re: auto-open gift bag on level?
I now renamed openGiftbag() to openGiftbags1To10(), to prepare the creation of a general inventory:openGiftbag and to make clear, that openGiftbags1To10 is something special.
So we can change/create the function inventory:openGiftbag later without disturbing the users.
So we can change/create the function inventory:openGiftbag later without disturbing the users.
The RoM Bot Online Wiki needs your help!
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest