need alittle help please

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
SMJ
Grandmaster Poster
Posts: 113
Joined: Wed May 10, 2006 5:15 pm

Post by SMJ »

No, it's all pretty 095 Compliant. Does the script compile?
Damo307
Expert Poster
Posts: 79
Joined: Fri Jul 07, 2006 1:32 am

Post by Damo307 »

think so
SMJ
Grandmaster Poster
Posts: 113
Joined: Wed May 10, 2006 5:15 pm

Post by SMJ »

Have you tried?
Damo307
Expert Poster
Posts: 79
Joined: Fri Jul 07, 2006 1:32 am

Post by Damo307 »

i cant right now, my laptop charger just died on me =(
User avatar
tekproxy
Forum Regular
Posts: 352
Joined: Thu Apr 06, 2006 5:11 pm

Post 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?
Damo307
Expert Poster
Posts: 79
Joined: Fri Jul 07, 2006 1:32 am

Post 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
SMJ
Grandmaster Poster
Posts: 113
Joined: Wed May 10, 2006 5:15 pm

Post 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.
Damo307
Expert Poster
Posts: 79
Joined: Fri Jul 07, 2006 1:32 am

Post by Damo307 »

ill think ill just put aside the chromotile for now
Damo307
Expert Poster
Posts: 79
Joined: Fri Jul 07, 2006 1:32 am

Post 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
User avatar
CWO
POL Expert
Posts: 1160
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

By using MoveCharacterToLocation (for pre096... MoveObjectToLocation for 096+)
Damo307
Expert Poster
Posts: 79
Joined: Fri Jul 07, 2006 1:32 am

Post 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
}
Post Reply