PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
[Solved]Creating "text" commands?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095)
Display posts from previous:   

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Tue Apr 18, 2006 5:15 pm    Post subject: Reply with quote

Please post the compiler error that is displayed.

Author Message
CWO



Joined: 04 Feb 2006
Posts: 685
Location: Chicago, IL USA

PostPosted: Tue Apr 18, 2006 6:32 pm    Post subject: Reply with quote

junkitem := CreateItemAtLocation( what.x, what.y, what.z, 0x709s, 1 )

0x709s is invalid... maybe mean 0x709a? also put a ; at the end of that line.

Author Message
Tritan



Joined: 04 Feb 2006
Posts: 136
Location: Illinois, USA

PostPosted: Tue Apr 18, 2006 9:34 pm    Post subject: Reply with quote

This is the dot command I use on my shard. It creates a "hand" at the targetted location.

Code:
use uo;
use os;

// These should be in your client.inc file.  If not you can add them there and use the include "client"; call instead.
const FONT_NORMAL       :=  0x03;   // Normal (default).
const ANIM_SALUTE               :=  0x0021; // Salute.


program point (who)
   SendSysMessage( who, "Point at what?" );
   var it := TargetCoordinates ( who );
   
   var itdesc;
   if ( it.item.name )
      itdesc := it.item.name;
      it := it.item;
   elseif ( it.item.desc )
      itdesc := it.item.desc;
      it := it.item;
   elseif ( it.mobile )
      itdesc := it.mobile.name;
      it := it.mobile;
   else
      it := CreateItemAtLocation( it.x, it.y, it.z, 0x706c, 1 );
      it.name := who.name;
      it.graphic := 0x206e;
      it.movable := 0;
      itdesc := "that spot";
      SetObjProperty (it, "destroyme", 1);
   endif      

   if ( it.hidden )
      SendSysMessage( who, "Canceled" );
      return;
   endif

   PerformAction ( who, ANIM_SALUTE );
   PrintTextAbove ( who, "*points at " + itdesc + "*", FONT_NORMAL, 55);
   sleepms (500);
   PrintTextAbove ( it, "*" + who.name + " points here*", FONT_NORMAL, 55);
   sleep (2);
   if ( it.objtype == 0x706c )
      if (GetObjProperty (it, "destroyme"))
         DestroyItem( it );
      endif
   endif
endprogram


This compiles in 95 and works very well. Hope it helps you out.

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095) All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty