| callimuc |
10-27-2011 07:28 PM |
Quote:
Posted by comet graal
(Post 26998)
Create an NPC with the following code
bla
I'm not sure though.
|
PHP Code:
function onCreated() { setimg("ImageNameHere"); }
- Setīs the requested image. Donīt forget to add the prefix.
PHP Code:
function onCreated() { setimgpart("ImageNameHere", startX, startY, width, height); }
- startX: Where it will start to draw the image at the X coordinates. Itīs counted in pixel.
- startY: Where it will start to draw the image at the Y coordinates. Itīs counted in pixel.
- width: How many pixel will be displayed in the X row (width).
- height: How many pixel will be displayed in the Y column (height).
PHP Code:
function onCreated() { showimg(index, "ImageNameHere", X, Y); changeimgcolors(index, red, green, blue, alpha); changeimgpart(index, startX, startY, width, height); changeimgvis(index, alpha); changeimgzoom(index, size); }
- X: Where the image will be shown at the X row. Itīs counted in pixel.
- Y: Where the image will be shown at the Y column. Itīs counted in pixel.
- index: Thatīs the imageīs ID. Having 2 exact IDīs in one script will change that image. If the index is smaller 200, it will be shown to everyone. above 200 will just show it clientside.
- red: The red part of the image. Goes up to 1 (=100%).
- green: The green part of the image. Goes up to 1 (=100%).
- blue: The blue part of the image. Goes up to 1 (=100%).
- alpha: The alpha part of the image. Goes up to 1 (=100%).
- size: How big / small the image will be zoomed.
Here are again the commands again for GS1 (offline editor). Explanation is the same.
PHP Code:
if (created) { setimg ImageNameHere; }
PHP Code:
if (created) { setimgpart ImageNameHere, startX, startY, width, height; }
PHP Code:
if (created) { showimg index, ImageNameHere, X, Y; changeimgcolors index, red, green, blue, alpha; changeimgpart index, startX, startY, width, height; changeimgvis index, alpha; changeimgzoom index, size; }
|