nb Core Community
May 22, 2012, 04:26:01 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: 1.2.3 +nb is now final and released

@new registrations. I will not allow any new registrations here as there are more (real person) spambots here than ever.... captcha proved to be ineffective.

After your registration, mail me at ( admin AT shinobilegends.com ) from the mail address you want to register. Provide some text about you and possibly your game.
 
   Home   Help Search Calendar Downloads Login Register  
Pages: [1]
  Print  
Author Topic: Ai scripts to special events  (Read 964 times)
Alchemion
Guest
« on: September 24, 2008, 05:27:00 pm »

hi,

i would like to test the a.i. scripts on creatures from special forest events...

i see you have modified the core engine so that the ai scripts are called through a function require...

can i also call for the ai script from within the forest special event and if so, is there a general location to put the "require .." code to ?...

if it is a general position of the code, where would it be, and how would be the "require.." code ?...

if it is particular for every forest special event module, then i will get back with details... Cheesy

thanks.
Logged
Nightborn
Administrator
Sr. Member
*****

Karma: +20/-0
Posts: 307



View Profile WWW
« Reply #1 on: September 24, 2008, 05:50:02 pm »

well.

*I* have made the *FOREST* creatures to have the AI having a require ... because else any creature editor can introduce malicious code on your server =) and get root/admin privileges.

You, in your module, can do what you please.

you don't need to require anything, you can simply put the code you want to have eval()d in there. It works.
Logged

It should be fixed, but it won't be easy and it won't be fast. If you want
to help - wonderful. But keep in mind that it will take months of wading
through the ugliest code we have in the tree. If you've got a weak stomach -
stay out. I've been there and it's not a nice place.

   - Al Viro
Iori
Guest
« Reply #2 on: October 06, 2008, 03:43:39 pm »

well.

*I* have made the *FOREST* creatures to have the AI having a require ... because else any creature editor can introduce malicious code on your server =) and get root/admin privileges.

You, in your module, can do what you please.

you don't need to require anything, you can simply put the code you want to have eval()d in there. It works.

And make sure to escape your code if you choose not to use a require(), since eval() will try to execute a string (bound by quotes) as code.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!