Jump to content
  • 0

how to call script that is in a text column in mysql


Question

Posted

I have a lookup table in mysql where it has an ID and script column. On the script column it contains text data like on the code block below. The intent of the table is that if they reach a certain level that is equal or greater than the ID column, the script column for that ID will be called. 
My question is, how do you call the script column in your NPC script? Wondering if this is possible, since i have a few events that will benefit this one lookup table, instead of writing each one of the rewards.

getitem 13534; getitem 14533;

 

1 answer to this question

Recommended Posts

  • 0
Posted

You can't store script commands in a string, and the only way to call data from a DB is to store it as an integer or a string. 

To get a script to perform "getitem" you need to explicitly type "getitem" into your script. 

If it's something that you use a lot of times, perhaps create a function instead of calling from the DB.

 

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