Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   PlayerWorlds Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=15)
-   -   Infamous, tileset/NPC trouble.. (https://forums.graalonline.com/forums/showthread.php?t=78710)

warmaster70229 02-14-2008 06:18 PM

Infamous, tileset/NPC trouble..
 
Hello, I would like some help from the global script team, there seems to be a problem with the NPC-Server on infamous...

I created a weapon, -System/Core and placed in it the following code:

PHP Code:

function onActionServerSide(cmd)
{
  echo(
"Hai");
}

//#CLIENTSIDE
function onCreated() 
{
  
removetiledefs();
  
addtiledef("pokeSMOT_InfamousTiles.png""infamous_" 0);
  
loadmap("Infamous.gmap");
  
triggerServer("gui",name,"d00d");
}

function 
onPlayerchats()
{
  if(
player.chat=="/reconnect")
  {
    
serverwarp("Infamous");
  }


The onCreated() function is not called, thus the serverside function i was using to test the onCreated() call was also not called.

Mind me if there is some stupid mistake i made, having some IRL trouble and am not really myself right now...

Switch 02-14-2008 07:04 PM

Quote:

Originally Posted by warmaster70229 (Post 1375026)
PHP Code:

  triggerServer("gui",name,"d00d"); 


Should be triggerserver("gui",this.name,"d00d");
of course, you can make it triggerServer, doesn't matter xD

xAndrewx 02-14-2008 07:08 PM

make sure that the weapon is being added to the players upon login.

DustyPorViva 02-14-2008 07:16 PM

Quote:

Originally Posted by Switch (Post 1375030)
Should be triggerserver("gui",this.name,"d00d");
of course, you can make it triggerServer, doesn't matter xD

this. isn't needed.

Crow 02-14-2008 07:39 PM

Quote:

Originally Posted by DustyPorViva (Post 1375035)
this. isn't needed.

What Dusty said *points up*

warmaster70229 02-14-2008 11:23 PM

It is being added, and the triggerserver isn't important, just a way to see if onCreated() was being called, it's the addtiledef() that is important.

Chompy 02-14-2008 11:27 PM

use "/find pokeSMOT_InfamousTiles.png" in rc, to check if it's found and/or downloadable

cbk1994 02-14-2008 11:38 PM

Generally don't use capitalization in Graal file names.

I would change the gmap so it doesn't use capitalization as well.

And also, REMOVE THE LOADMAP! That is for offline only! IT SHOULDN'T BE USED ON A SERVER! Add the name of the gmap to gmaps= in the server options.

And I've found that removeTileDefs() only seems to work if you put a "" inside, but they may have fixed it.

DustyPorViva 02-14-2008 11:38 PM

Well it's been said, make sure the player actually has the weapon(it's case sensitive, by the way). You can't put 'Weapon' in the players weapon list when the weapon is called 'weapon'.
Also, you can easily check and see if onCreated is being called by putting player.chat="test" in there.

napo_p2p 02-14-2008 11:39 PM

Quote:

Originally Posted by Chompy (Post 1375061)
use "/find pokeSMOT_InfamousTiles.png" in rc, to check if it's found and/or downloadable

Yes do that first. Also removetiledefs() takes one parameter. You would need to put removetiledefs("");

warmaster70229 02-15-2008 12:04 AM

I didn't add the loadmap, it was questionable to me, but i thought poke had his reasons :P

Anyways ill try what you guys said and see if it works...

Edit: I checked, it is there AND downloadable, then i checked my graal/levels/tiledefs folder, the tile set isn't even being set.

xAndrewx 02-15-2008 09:41 AM

are you sure that the weapon is being added to the player?

Arch_Angel 02-15-2008 01:46 PM

This is because (I think) the tiles are not named properly. Tiles have to have the word 'tileset' in there name for them to load to the Graal folder properly. Try re-naming the tiles to 'pokesmot_infamous-tileset1.png' or soemthing along those lines.

Pimmeh 02-15-2008 09:18 PM

no, not true.
My tileset was always named something along the lines of
quian_new.png or w/e

napo_p2p 02-15-2008 10:53 PM

warmaster, try to catch me on AEON sometime, and I'll be glad to help you out personally.

cbk1994 02-15-2008 11:15 PM

Quote:

Originally Posted by Inverness (Post 1375165)
Don't give people advice when you don't know what you're talking about, thanks.

Is this just your personality? I've been told by everyone NEVER use it online. You could ... I don't know ... tell me instead of just be rude about it ...
Quote:

Originally Posted by Inverness (Post 1375165)
If you knew how to read the Wiki you would know this.

Where did I ever say I didn't know how to read the Wiki? "Not knowing how" and "not reading every page" are completely different things ...

Inverness 02-15-2008 11:27 PM

Quote:

Originally Posted by cbkbud (Post 1375173)
<snip>

My apologies for the rudeness, it comes naturally and I get rather incensed when people give bad advice when it comes to things like scripting.
Quote:

Originally Posted by cbkbud (Post 1375173)
I've been told by everyone NEVER use it online.

Well then, "everyone" is wrong because I've always used it online and it works just fine. I would like to know who "everyone" is and who told them that.

And another thing, there is no reason for loadmap to be just for offline considering:
Quote:

Originally Posted by Wiki
For offline editing add the gmap name as a new line to a file loadgmaps.txt which must be put in your Graal Editor base folder. The editor will automatically load the gmap once it is started and will correctly link levels.

Which invalidates any reason for loadmap being offline only if this method exists. This method is actually better since you don't have to bother having the script in the level.

Arch_Angel 02-16-2008 12:15 AM

Quote:

Originally Posted by Pimmeh (Post 1375157)
no, not true.
My tileset was always named something along the lines of
quian_new.png or w/e

well the lates time i tried something like that, the tiles didnt load. then i talked to dusty, and he said i had to put tileset in the name of it for it to load properly. have you done this recently ? maybe it is an update or something, im not sure. but thats just wat i was told >_<

Inverness 02-16-2008 02:12 AM

Quote:

Originally Posted by Arch_Angel (Post 1375188)
and he said i had to put tileset in the name of it for it to load properly.

Good lord. Where do you people get your information from? That is completely WRONG.

DustyPorViva 02-16-2008 05:38 AM

Hmm? I don't remember saying anything like that.

Inverness 02-16-2008 09:49 PM

I would recommend using this.name instead of just 'name' I had a case where using that actually fixed an odd bug which I believe was with the engine itself.
Quote:

Originally Posted by cbkbud (Post 1375063)
And also, REMOVE THE LOADMAP! That is for offline only! IT SHOULDN'T BE USED ON A SERVER! Add the name of the gmap to gmaps= in the server options.

Read:
Quote:

Originally Posted by http://wiki.graal.net/index.php/Creation/Dev/GMap#Deployment
For speeding up the entering of maps you can preload gmaps on clientside using the script command "loadmap <mapname>;". This is actually not required, but will reduce the loading time when the player is warped onto the map.

The gmaps server option is mainly so the server can know what the gmaps are, not for the client.

By the way, if you're going to leave me negative rep, be nice and leave your name. :D


All times are GMT +2. The time now is 05:51 PM.

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