Page 2 of 2

Posted: Thu Jan 11, 2007 7:02 am
by SMJ
No, it's all pretty 095 Compliant. Does the script compile?

Posted: Thu Jan 11, 2007 7:14 am
by Damo307
think so

Posted: Thu Jan 11, 2007 7:23 am
by SMJ
Have you tried?

Posted: Thu Jan 11, 2007 7:38 am
by Damo307
i cant right now, my laptop charger just died on me =(

Posted: Thu Jan 11, 2007 8:07 am
by tekproxy
Recompile, restart POL (you have to restart when you make changes to an itemdesc.cfg file) and post any error messages you get or give specific details on how it doesn't work.

Does the script compile?
Does POL complain about anything when starting up?
Can the tile be created?
Does the tile just not do anything when you walk on it?

Posted: Thu Jan 11, 2007 2:54 pm
by Damo307
it compiles
cant check to see if POL says anything about it or not
the tile creates, but when i walk on it, nothing happens

Posted: Thu Jan 11, 2007 3:18 pm
by SMJ

Code: Select all

use util;

program walkon_ChromoTile(who, tile)
SendSysMessage(who,"DBG: Debugging walkon_ChromoTile");
sleep(1);
  /** All valid colors here separated by commas. */
  var validcolors := { 1, 2, 10, 20, 30, 40, 60, 80 };
SendSysMessage(who,"DBG: validcolors == "+validcolors);
sleep(1);

  var rint := RandomInt(validcolors.size())+1;
SendSysMessage(who,"DBG: rint == "+rint);
sleep(1);

  var color := validcolors[rint];
SendSysMessage(who,"DBG: color == "+color);
sleep(1);

  tile.color := color;
SendSysMessage(who,"DBG: tile.color == "+tile.color);
sleep(1);

SendSysMessage(who,"DBG: Done Debugging");
  return 1;
endprogram
This should give a string of messages saying:
DBG: Debugging walkon_ChromoTile
DBG: validcolors == array { 1,2,10,20,30,40,60,80 }
DBG: rint == [some integer]
DBG: color == [another integer]
DBG: tile.color == [color's integer]
DBG: Done Debugging.
If yours differs, or you don't get any output at all, then it's the itemdesc configuration.

Posted: Thu Jan 11, 2007 9:32 pm
by Damo307
ill think ill just put aside the chromotile for now

Posted: Thu Jan 11, 2007 11:27 pm
by Damo307
also i was just wondering when you make like a freeze tile or flame gate, how do i add the teleport effect?

i got my chromotile to work 100% now

Posted: Fri Jan 12, 2007 4:26 am
by CWO
By using MoveCharacterToLocation (for pre096... MoveObjectToLocation for 096+)

Posted: Fri Jan 12, 2007 4:38 am
by Damo307
i dont understand what you mean..

this is what i have for my script, but i dunno where or how to add the teleport effect

---------------------------------------------------------------------------
use uo;

include "include/attributes";

program freeze(who, tile)

who.frozen:=1; //freeze
sleep(10); //wait 30 secs or use sleep(randomint(10)+25); to randomize
who.frozen:=0; //unfreeze
endprogram
---------------------------------------------------------------------------
item 0x6
{
Name freezetile
Desc freeze tile
WalkOnScript freezetile
Color 1186
graphic 6173
movable 1
}