Jump to content
  • 0

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


Da Qiao

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  05/23/16
  • Last Seen:  

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

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  05/23/16
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

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 } }"; },{},{}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  05/23/16
  • Last Seen:  

 

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?

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  72
  • Reputation:   0
  • Joined:  07/29/17
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...