![]() |
is player.equip(float) the same as setstring clientr.equipped_id,#v(float); ?
Yeah, I don't get MUD functions at all, and asking the wiki just gives me a bunch of old advertisements for Kingdoms. (THANKS! -_-)
Basically, that system NPC I inherited does PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
The wiki doesn't neccesarily advertise Kingdoms functions. They are built directly into the NPC-Server (hard-coded; it makes it rather hard for Kingdoms staff to change them because Stefan is the only one who can, and then he has to update the NPC-Server).
"player.equip()" is not a built-in function. Can you please post the code for that function? It's usually best to use player functions whenever possible, by the way. That way, if you ever need to change something, it's easy to. Plus you can make sure that all code is done correctly. |
That's just it - player.equip() doesn't seem to exist Anywhere. It goes "An NPC calls
PHP Code:
playersystem has PHP Code:
Me, I just wanna shoot me some zombies. |
I would create a class with an equip function in it, join it to the player, and simply have it call the player system weapon where that function is located; it looks like that is what it's meant to do anyway.
|
Huh. You can join a class to a player? I wonder if that's what's happening...what does that look like?
Narf, right you are brain, there it is, thanks. :-D Still, I have no idea where it's Joined; there's a class player_functions that has equip(float), and it calls item_fonctions(sic)'s getItem(float) - which doesn't get called, because somewhere it's disjointed... Am I just looking for somewhere up the tree, join player_functions; join item_functions; ? No, apparently item_functions is just Joined automatically somewhere...-_- At least fixing the name typo fixed a lot of the problems... |
Try player.join("player_functions") when the player logs on (from serverside).
|
It must be hiding in one of these weapons...ah well, it's fixed now anyway. :-D
|
Quote:
Also, the equip function etc. remind me an awful lot of the one I scripted and released in the code library. |
It probably was. Codein made half a system NPC and quit, and the last I heard from Insomnia's manager he insisted I use it rather than throw it out and build something myself. :-P
|
All times are GMT +2. The time now is 07:31 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.