Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 06-29-2003, 03:18 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Quote:
Originally posted by Tseng


Uh. Do you even know what you're talking about?

Do you even know what the guy's trying to do?

He's trying to use strlen to return a value.

Using a for loop does not help him learn to use strlen.

And the fact that everyone else tells you to do for loops has absolutely nothing to do with this situation. Sorry, just had to complain about that.

Well, that was mean, I already admitted my mistake.
I was thinking about sarraylen, not strlen.
Reply With Quote
  #17  
Old 06-29-2003, 05:36 PM
Tseng Tseng is offline
Sublime
Tseng's Avatar
Join Date: Jan 2003
Location: California
Posts: 0
Tseng is on a distinguished road
Quote:
Originally posted by wonderboysp2p
omg i can just Align it?????
To the very best of my knowledge, yes. It requires putting a letter in between the @ signs of the showimg, and I believe is explained in one of the newfeatures.txts (though I may be wrong about it being in there- it's been a while since I looked for image-showing clarifications). As it happens, I haven't had an occasion to align something to the right, so I do not know the letter off the top of my head (although, the logical guess is r). If you can't find it, I'll have access to my other computer in a couple of hours, and can find it then.

Quote:
Originally posted by protagonist



Well, that was mean, I already admitted my mistake.
I was thinking about sarraylen, not strlen.
Perhaps it was mean, but he was trying to learn, and you were giving him incorrect information. Naturally, I will be very critical of cases like that, because when people are trying to learn, receive incorrect information, and it is not corrected, they not only learn wrong, but in some cases their own ignorance will prevent them from ever learning their way is wrong. I dealt with a case like this recently, in which a scripter not only refused to acknowledge something stefan had explained about triggeractions, but deleted a script of several hours work, as well as a few weeks' worth of that script's running and logging.
__________________
Funny Things:
Quote:
Originally posted by Stefan
I didn't ban you, I only played a little bit with my RC.
-----
Reply With Quote
  #18  
Old 06-29-2003, 07:09 PM
protagonist protagonist is offline
Banned
protagonist's Avatar
Join Date: May 2003
Location: CAW
Posts: 5,586
protagonist is on a distinguished road
Send a message via AIM to protagonist Send a message via MSN to protagonist
Yes, I didn't have the right command. But Kaimetsu pointed it out already, and I made it clear I was mistaken.
Reply With Quote
  #19  
Old 06-29-2003, 09:22 PM
KainM0rbid KainM0rbid is offline
Registered User
Join Date: Jun 2003
Location: Centreville, VA. U.S.A.
Posts: 4
KainM0rbid is on a distinguished road
Send a message via AIM to KainM0rbid
If you look in newfeatures2003.txt you will notice there is a nice new handy variable added called textwidth
so instead of using strlen() I would suggest using textwidth
NPC Code:

textwidth(size,font,style,text)


Makes things easier and more accurate than guessing a formula to get the width of your text

---Kain Morbid
__________________
"...and God said let there be Graal,
and there was Graal."
~Me
Reply With Quote
  #20  
Old 06-30-2003, 12:54 AM
wonderboysp2p wonderboysp2p is offline
Registered User
wonderboysp2p's Avatar
Join Date: Sep 2002
Location: -Wonderboy
Posts: 537
wonderboysp2p is on a distinguished road
Send a message via AIM to wonderboysp2p
umm... i dont think anyone has really helped solved my problem...
__________________

we are the llama FORUms!!!EWQ Ce13d5423f23!! 2e1 @$6tgv3uy65!
Reply With Quote
  #21  
Old 06-30-2003, 01:10 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by wonderboysp2p
umm... i dont think anyone has really helped solved my problem...
Ask Tseng,he is the best scripter of the world. ^_^
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #22  
Old 06-30-2003, 03:12 AM
KainM0rbid KainM0rbid is offline
Registered User
Join Date: Jun 2003
Location: Centreville, VA. U.S.A.
Posts: 4
KainM0rbid is on a distinguished road
Send a message via AIM to KainM0rbid
NPC Code:

if (created) {
timeout=.05;
}
if (timeout) {
timeout=.05;
setstring message2,This is NOT a Test;
showimg 2,@@b@#s(client.message2),screenwidth-strlen(#s(message2))*8,screenheight-21;
changeimgvis 2,4;
}


I have bolded what you forgot in your script.
though I do suggest using text width instead of strlen()*8 seeing as how textwidth is MUCH more accurate.

---Kain Morbid
__________________
"...and God said let there be Graal,
and there was Graal."
~Me
Reply With Quote
  #23  
Old 06-30-2003, 05:43 AM
wonderboysp2p wonderboysp2p is offline
Registered User
wonderboysp2p's Avatar
Join Date: Sep 2002
Location: -Wonderboy
Posts: 537
wonderboysp2p is on a distinguished road
Send a message via AIM to wonderboysp2p
yea kain i had gotten that part figured out but it turns out that *8 only works when each letter in message2 is lower case... numbers and CAPS screw up the placement.. which is why i want to know what tseng was talking about when he said i can probably align things to the right
__________________

we are the llama FORUms!!!EWQ Ce13d5423f23!! 2e1 @$6tgv3uy65!
Reply With Quote
  #24  
Old 06-30-2003, 06:32 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
It doesn't work at all when the font is not monospaced. Anyway:

Firstly, use showtext instead of showimg. Secondly, use an 'r' in the style argument. If you don't understand, read newfeatures.txt.
__________________
Reply With Quote
  #25  
Old 06-30-2003, 07:15 AM
wonderboysp2p wonderboysp2p is offline
Registered User
wonderboysp2p's Avatar
Join Date: Sep 2002
Location: -Wonderboy
Posts: 537
wonderboysp2p is on a distinguished road
Send a message via AIM to wonderboysp2p
alright thanks kai
i used showimg because im just more used to showimg @@@ but yea ok show text and r in style arguement all so simple ^_^
__________________

we are the llama FORUms!!!EWQ Ce13d5423f23!! 2e1 @$6tgv3uy65!
Reply With Quote
  #26  
Old 07-06-2003, 09:13 PM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
lol, showtext, I can't stand that!
sarraylen() needs a for loop why? Sarraylen you don't need #s for, and it checks the amount of arrays in it rather than it's length x-x
---Shifter
__________________
Who has time for life these days?
Reply With Quote
  #27  
Old 07-07-2003, 03:37 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Projectshifter
lol, showtext, I can't stand that!
¬_¬
__________________
Reply With Quote
  #28  
Old 07-07-2003, 09:14 AM
wonderboysp2p wonderboysp2p is offline
Registered User
wonderboysp2p's Avatar
Join Date: Sep 2002
Location: -Wonderboy
Posts: 537
wonderboysp2p is on a distinguished road
Send a message via AIM to wonderboysp2p
cmon kai you cant deny that after using showimg @@@ for a while, it's hard to switch over to a new command
__________________

we are the llama FORUms!!!EWQ Ce13d5423f23!! 2e1 @$6tgv3uy65!
Reply With Quote
  #29  
Old 07-07-2003, 09:27 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by wonderboysp2p
cmon kai you cant deny that after using showimg @@@ for a while, it's hard to switch over to a new command
Uh, no it isn't. I never used showimg to display text after showtext was released.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:29 AM.


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