Rayvolution
Journeyman
Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1
Aetharia
|
RE: Trying to move NPCs at night to "go home", I blame sectorsleep.
(08-11-2012 06:34 AM)Extreme Wrote: <snip>
Here's my modified version of your script, it's working as well! Although, I don't understand why yours works, and my original one doesn't. They both basically do the exact same thing, yours just uses CONT. and mine uses LINK. But for some reason, that seems to be doing the trick to ignore sectorsleep.
Very strange indeed, but it's working now. I need to clean up the code, and change the coordinates for CONT.HOME to read a tag on the NPC rather than a set number. but everything seems fine now!
Any ideas why yours is working, and mine isnt?
New (working) code.
Code:
[EVENTS e_AI_Vendor]
ON=@NPCLookAtChar
IF (<RESTEST i_mem_vendor_home>)
ELSE
SERV.NEWITEM i_mem_vendor_home
EQUIP <NEW>
NEW.TIMER=5
ENDIF
[ITEMDEF I_MEM_VENDOR_HOME]
ID I_MEMORY
TYPE T_EQ_SCRIPT
NAME Vendor Home Memory
ON=@CREATE
ATTR 010
ON=@TIMER
IF (<CONT.SECTOR.LIGHT> > 10) && (<CONT.DISTANCE <CONT.HOME>> > 4)
CONT.SAY @,,1 It's night, I'm going home.
CONT.GOTO <CONT.HOME>
ELSE
IF <CONT.SECTOR.LIGHT> > 10
CONT.HOME 2542,2158,1
CONT.SAY @,,1 It's Night, and I am at home.
ENDIF
IF (<CONT.SECTOR.LIGHT> < 10) && (<CONT.DISTANCE <CONT.HOME>> > 4)
CONT.SAY @,,1 It's day, I'm going to work.
CONT.GOTO <CONT.HOME>
ELSE
IF <CONT.SECTOR.LIGHT> < 10
CONT.HOME 2460,2062,1
CONT.SAY @,,1 It's Day, and I am at work.
ENDIF
TIMER 6
RETURN 1
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!
(This post was last modified: 08-11-2012 08:16 AM by Rayvolution.)
|
|
08-11-2012 07:37 AM |
|
|