Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Replacing Chat with Image (https://forums.graalonline.com/forums/showthread.php?t=134265605)

sssssssssss 01-22-2012 09:15 AM

Replacing Chat with Image
 
So, I've been at this for a while. I have it where I can replace certain letters with other letters, and the only thing I could think of to do from there is us GuiDrawingPanel, but it just returns unknown object, obviously. Any ideas on how to approach this?

fowlplay4 01-22-2012 09:25 AM

If you're aiming for a bitmap text scheme you basically have to...

1. Convert the current character in text to a position on your image.
2. Draw the character using part of your image.
3. Move your drawing point next to the drawn letter.
4. Move on to the next character and repeat until text is completely drawn.

You could also do this using showimg, guishowimgctrls.

There's going to be a quite a bit of math involved though so good luck.

sssssssssss 01-22-2012 09:55 AM

This probably ends up being the same procedure, but what I'm actually trying to do is just replace when someone says "block" with block.png, and still have the regular old chat before and after the png.

If it is the same, can you give me pointers on each of the steps? I can already tell to really explain you'd need more than a short post, but I'm still not sure where to go and trying to learn.

Thanks as well. :)

sssssssssss 01-30-2012 02:43 AM

:/
anybody? Ive searched and searched and can't find a way to find a point on the screen x,y for chat. Only a point in the chat string is what I have.

fowlplay4 01-30-2012 03:47 AM

You can use two events to parse and deal with all chat:

PHP Code:

//#CLIENTSIDE

function onPlayerChats() {
  
onRemotePlayerChats(playerplayer.chat);
}

function 
onRemotePlayerChats(objtxt) {
  
// txt is their chat
  // you can use obj.x, obj.y as your center point




All times are GMT +2. The time now is 09:23 PM.

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