Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   writing (https://forums.graalonline.com/forums/showthread.php?t=18856)

Brad_Elven 12-14-2001 02:21 AM

writing
 
How do u use writing using showimg to appear where u want? Like for a taylor or a menu or something?

Like Shadow Knight showed me a taylor he made and it used a menu that consisted of text and the select cursor was >

konidias 12-14-2001 02:39 AM

NPC Code:

showimg 202,@Courier New@cb@Text Here,playerx,playery-5;
changeimgvis 202,4;
changeimgzoom 202,1.5;
changeimgcolors 202,0,0,0,1;



just put in the font name where font is.. and you can use any style in the second part "cb" means center and bold, there is also
u - underlined
i - italic

then the text, and then the x and y of the text ;)

BocoC 12-14-2001 02:52 AM

TAILOR, not TAYLOR. TAYLOR is a name of somebody. A TAILOR is a person who mends clothes.

Brad_Elven 12-14-2001 03:48 AM

Quote:

Originally posted by konidias
NPC Code:

showimg 202,@Courier New@cb@Text Here,playerx,playery-5;
changeimgvis 202,4;
changeimgzoom 202,1.5;
changeimgcolors 202,0,0,0,1;



just put in the font name where font is.. and you can use any style in the second part "cb" means center and bold, there is also
u - underlined
i - italic

then the text, and then the x and y of the text ;)

Thanks :)

How would you make it like a menu or something? where if something is selected?

Python523 12-14-2001 04:45 AM

Quote:

Originally posted by BocoC
TAILOR, not TAYLOR. TAYLOR is a name of somebody. A TAILOR is a person who mends clothes.
Almost every server has that problem with tailor

TDO2000 12-14-2001 05:57 AM

something like this:
NPC Code:

if(playertouchsme && save[0]==0){
save[0]=1;
this.pos=1;
timeout=.05;
}

if(timeout){
disabledefmovement;
drawmenue();
drawcursor();
movement();
if(save[0]==1){timeout=.1;}
}

function drawmenue() {
this.maxposes=3; //how many selections
//showing the text
showimg 1,@Text1,x,y-((this.maxposes-1)*3);
showimg 2,@Text2,x,y-((this.maxposes-2)*3);
showimg 3,@Text3,x,y-((this.maxposes-3)*3);
}

function drawcursor() {
//showing it
showimg this.maxposes+1,@-->,x-2,y-((this.maxposes-this.pos)*3);
}

function movement() {
if(keydown(0) && this.pos > 1){this.pos--;}
if(keydown(2) && this.pos < this.maxposes){this.pos++;}
//deactivate
if(keydown(6)){
save[0]=0;
delimg();
}
//Getting position
if(keydown(4)){
save[0]=0;
enabledefmovement;
doevent();
delimg();
}
}

//for hiding all the images
function delimg() {
//hide imges
for(this.i=0;this.i < this.maxposes+1;this.i++){
hideimg this.i;
}
}

function doevent() {
if(this.pos==1){code;}
if(this.pos==2){code;}
if(this.pos==3){code;}
}



haven't tested it and it's too long I think but ok for an example...

btedji 12-14-2001 06:10 AM

If you want easy use chat commands

Faheria_GP2 12-14-2001 06:17 AM

yes, NAT-Chief of TDK spells it Taylor!

:D:D:D

aesquivel 12-14-2001 11:01 AM

i thought it could be spelt either way :confused:

T-Squad 12-14-2001 01:54 PM

Ack...Why didn't you IM me about this? I could haved whipped up a script which would be less then 10 lines long and perfectly efficient =/ You probably already have something though.

btedji 12-14-2001 08:21 PM

#C5 is the players outline if you did not know


All times are GMT +2. The time now is 12:40 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.