Jump to content
  • 0

Select monster through query_sql?


Selerie

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  13
  • Reputation:   0
  • Joined:  12/27/21
  • Last Seen:  

Please help me with a query_sql command.

Basically a command variable that randomly select a monster  from mob_db  that has a card ID (so that colored plants and mushrooms will not be selected) to hunt for the current week. 

e.g

.motw$ = (query_sql... command here.);

announce "The monster of the week is " + .motw$, 0;

 

Any guidance is much appreciated. Thanks

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

query_sql("SELECT `id`, `name_endlish` FROM `mob_db` WHERE `card_id` > 0 AND `id` NOT IN (1083,1084) ORDER BY RAND() LIMIT 1",.@mob_id,.@mob_name$);

if u have a complete mob_db , just filter all the mob using the sql query.

NOT IN (1083,1084)

just fill in more mob_id that you want to blacklist.

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