Jump to content
  • 0

[Script/Source] Summon monster at n% chance on attack.


Question

Posted

Hello,

I want to make a custom item with this description:
- Summoner's staff: Add a <n>% chance of summoning monster <monster> to assist you in battle. The monster will disappear after sometime. There is only max of <x> monsters can be summoned at a time.

 

Yes, it sounds like summon command but auto called on attack. So basically, Im looking for something similar to autobonus except it's not restricted to bonus script. Can this be achieved by item script?

Im also thinking of making a custom skill which do this job, and then use Autospell to call it in item script. I think this is a proper way to do it but it's not an easy job /sob

So, please guide me how to do it (scripting or source change are all welcomed).
Thanks!  /no1

6 answers to this question

Recommended Posts

  • 0
Posted
1201,Knife,Knife,5,50,,400,17,,1,3,0xFE9F7EEF,7,2,2,1,1,1,1,{ autobonus "{}",10,1000,BF_WEAPON,"{ if(@summon_limit < 5){ summon strcharinfo(0),1001,60000; summon_limit += 1 } }"; },{},{}

untested

  • 0
Posted
1201,Knife,Knife,5,50,,400,17,,1,3,0xFE9F7EEF,7,2,2,1,1,1,1,{ autobonus "{}",10,1000,BF_WEAPON,"{ if(@summon_limit < 5){ summon strcharinfo(0),1001,60000; summon_limit += 1 } }"; },{},{}

untested

 

Hello Stolao, sorry for the late reply.

Unfortunately, your script works for summoning part but fail the limit, it summons countless mobs lol.

Anyway, thanks for your help.

  • 0
Posted

my bad typo in script
 

1201,Knife,Knife,5,50,,400,17,,1,3,0xFE9F7EEF,7,2,2,1,1,1,1,{ autobonus "{}",10,1000,BF_WEAPON,"{ if(@summon_limit < 5){ summon strcharinfo(0),1001,60000; @summon_limit += 1 } }"; },{},{}
  • 0
Posted

 

my bad typo in script

 

1201,Knife,Knife,5,50,,400,17,,1,3,0xFE9F7EEF,7,2,2,1,1,1,1,{ autobonus "{}",10,1000,BF_WEAPON,"{ if(@summon_limit < 5){ summon strcharinfo(0),1001,60000; @summon_limit += 1 } }"; },{},{}

 

 

my bad typo in script

 

1201,Knife,Knife,5,50,,400,17,,1,3,0xFE9F7EEF,7,2,2,1,1,1,1,{ autobonus "{}",10,1000,BF_WEAPON,"{ if(@summon_limit < 5){ summon strcharinfo(0),1001,60000; @summon_limit += 1 } }"; },{},{}

Hello Stolao

Thanks for your script, it works with limit now but when the summoned monster die, the limit does not subtract. I tried add an event to summon command (as doc said) but that event trigger when monster OnMonsterSummoned, not OnMonsterDead. So how can I achieve that?

  • 0
Posted (edited)
On 6/6/2016 at 12:16 AM, Stolao said:

Might be possible to add sleep2 60000; @summon_limit -= 1; after summon_limit += 1;

This is a good idea. I have tested your script, but the monster limit didn't work, it keeps spawning. Could you help us how to make it doesnt spawn it more than 3 or 5 times??

Edited by Rizz

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...