Jump to content

[AI] Monster Invasion Event


Recommended Posts


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  130
  • Reputation:   43
  • Joined:  12/11/11
  • Last Seen:  

[AI] Monster Invasion Event

The monster invasion which will change difficulty depending on how well the players are doing!

Description:

This script will allow the users to go through a monster invasion event in three stages, helping a poor Banquet Houseman who can't finish his job. The monsters spawned are first determined by the level of the character, and then adjusted depending on how difficult it was for him/her.

The player has 10 minutes to clear the three stages. If the player runs out of time, the HP is decreased for the spawned monsters, if the player finishes it in under 5 minutes, the HP is increased for the spawned monsters.

If the player dies a lot of HP during the event, the damage is decreased for the spawned monsters and likewise if the player don't get hurt that much, the damage is increased.

It will search for monsters in the table `mob_db` so if you don't want it to find custom mobs, add them to `mob_db2`.

It will only find monsters who match these criteria:

  • Attack is above 1 and matches the difficulty
  • HP is above 1 and matches the difficulty
  • DEF and MDEF is below the users level
  • The monster can move and attack

Note: At start it'll be easy for all levels. It will balance over time.

Requirements:

This script uses the queue system found here. You need to download and add it.

You need to set up the config at the top of the script.

Settings in the script:

  • Name of NPC
  • Which queue number it should have (leave this as 1 if you're unsure)
  • What map the event should use, make sure it's an empty map
  • Where the player enters the map
  • If donators/GMs should have priority in the queue system

Prize:

The script will look up the 100 rarest items owned by players on your server and give one of those.

It determines the rarity by how many is owned overall by the players.

Download link:

http://rathena.org/b...58-ai-mobspawn/

ai.txt

Edited by plankt
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   253
  • Joined:  11/11/11
  • Last Seen:  

For some reason I get these everything I load the map server:

[Error]: script_rid2sd: fatal error ! player not attached

[Debug]: Function: getcharid (1 parameter):

[Debug]: Data: number value =3

[Debug]: Source (NPC): queue_main

Yes, I have your Queue main script, just not the "Test" one nor the Speedtest.

Edited by Mysterious
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  130
  • Reputation:   43
  • Joined:  12/11/11
  • Last Seen:  

It seems like you're missing the 'end;' above 'OnPCLogoutEvent:' in the NPC 'queue_main'.

The download should have it in place, if you still get the same error message, check from line 30 in 'queue.txt' that is looks like this:

end;

// Removes a player or the party from the queue if they log out.
OnPCLogoutEvent:
set .@id, getcharid(3);

Please re-download the 'queue.txt' Version 1.01.

Edited by plankt
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   253
  • Joined:  11/11/11
  • Last Seen:  

Ouch.. I swear I downloaded the newest one D:! Crap! Thanks a lot though. I tested your script and it's very good. However, you should add an option to go as a party :( I added a timer just so people don't keep using it over and over.

Edited by Mysterious
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  12/26/11
  • Last Seen:  

Very impressive work plankt, I've been searching/trying to make a decent queue system for awhile now. However, if its possible, I'd suggest making it to where you can have multiple games going at the same time. For example, after a "X" ammount of people queued in one room that activates a loop that changes the event number and/or the map number (kh_kiehl02 changes to kh_kiehl03) and after it goes through all the maps you have for the event it reverts back to the 1st one.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  130
  • Reputation:   43
  • Joined:  12/11/11
  • Last Seen:  

Thanks for the comments!

Mysterious, This event is made for single players since it adjusts the difficulty but I've thought about it and might add the feature of joining as a party later on.

MisterLayzee, The queue systems topic is here, I'm glad if you post issues and suggestions regarding it there to bump it a bit :D

The queue system itself just handles putting people in queue and returning the AIDs you want. You can have many events working with the same queue if you just use the same number for all of them. In that way you have full freedom in handling rooms etc in your code.

The queue itself isn't limited in size as long as your database can handle it, so you can put thousands of people in the queue but you can only take out 127 players at a time.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  12/26/11
  • Last Seen:  

I ment having multiple events going at the same time. Since this event is only Single Player and you can have like 100 poeple waiting in the queue, the wait time would be HUGE. But if you have say 5, 10, 20 instances of the same event you can cut the wait time substancially making it more enjoyable for the players.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  130
  • Reputation:   43
  • Joined:  12/11/11
  • Last Seen:  

You could, theoretically, just add the script twice (or more times) and do these changes to the copy:

Change:
prontera,155,188,4 script Banquet Houseman 109,{


To:
-<tab>script<tab>BH#<tab>-1,{
Where # is the current copy

And make sure that they have different '.map$'.

That should give you two of the same event, sharing queue, without them messing with each other noticeably :P

Edited by plankt
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
Reply to this topic...

×   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...