Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-09-2012, 11:35 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
-Playerlist functions & loading buddies from Server

Well I got 2 questions in this thread (didnīt want to post 2 threads).

First question:
I wanted to mess around with the Playerlists functions. I have been testing around getting the default Playerlists functions (default weapon name: -Playerlist). I wanted to ask if someone knows the parameters for the functions or how I could get them (via Script?), just like I can call the functions using (@"-Playerlist").getfunctions().
And which functions can actually get really used for other purposes (like onPMsend() could be usefull for other scripts)?

Here is also a list of them:
PHP Code:
getAccountGroup
onPlayerChanges
addGroupsToMenu
getOrderGroup
performSearch
addPlayerToList
dblClickOnPlayer
onSearchTyped
onServerListerConnect
onReceiveText
addGroupHeader
onPMSend
getGuildListEntry
drawPlayerHeadOnPanel2
initPlayerList
drawOptionsPanel
anyPmsWaiting
getGroupFile
forcePlayerListShow
displayPlayerOnSpecifiedList
onPlayerLogout
updateTabIcons
onOpenPlayerlist
getRealLevelName
onPMHistory
sortPlayerlist
getServerListEntry
drawPlayerMessageIcon
onToggleScriptedPlayerList
getPlayerHint
onDefaultStyleChanges
drawPlayerHead
onSortPlayerList
onPMClose
onDestroySearchWindow
onControlKeyDown
onMapClick
loadOptionsConfig
onPM
loadGroupLists
getTranslatedNick
onSaveConfig
onURLClick
onPMWindowKey
updatePlayerCount
onPlayerLogin
onOpenSelectedPlayerPM
updateButtonPositions
displayPlayerOnList
onServerLogin
drawPlayerHeadOnPanelNoDefault
setGUIStyle
lastRow
addPlayerList
onPlayerListEnter
onReOrderList
openHistoryWindow
openPMWindow
drawPlayerHeadOnPanel
onPlayerListSelectAll
onFirstResponderChanges
onSelectOptionsCheckBox
showSearch
setAccountGroup
getOptionsNick
saveOptionsConfig
onPMKey
drawPListIcons
getGUIStyle 

Second question: (solved until further suggestions)
How could I load the buddies of a player from the server? Since I saw that option on the F3 settings, I thought they wouldnīt be saved on the clients buddyaccounts.txt. Or am I wrong?
__________________
MEEP!

Last edited by callimuc; 01-10-2012 at 01:24 AM..
Reply With Quote
  #2  
Old 01-10-2012, 12:05 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
You can get the online buddies of a player by checking otherPlayer.isBuddy (clientside). I don't think you can get a full list without some hackish stuff.
__________________
Reply With Quote
  #3  
Old 01-10-2012, 01:23 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by cbk1994 View Post
You can get the online buddies of a player by checking otherPlayer.isBuddy (clientside). I don't think you can get a full list without some hackish stuff.
Hmm ok thanks about that.
__________________
MEEP!
Reply With Quote
  #4  
Old 01-10-2012, 01:45 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by callimuc
I wanted to mess around with the Playerlists functions. I have been testing around getting the default Playerlists functions (default weapon name: -Playerlist). I wanted to ask if someone knows the parameters for the functions or how I could get them (via Script?), just like I can call the functions using (@"-Playerlist").getfunctions().
Most of the functions in the playerlist script are not public anyway; the only interesting functions are:
  • anyPmsWaiting()
  • addCustomMenuEntry(int entry id, string entry text)
  • openPMWindow({TServerPlayer player object, TServerPlayer player object, ...}, boolean is mass PM)
  • openHistoryWindow(TServerPlayer player object)
Functions that aren't listed here are either inaccessible or of no use to you, for a variety of reasons.
Quote:
Originally Posted by callimuc
How could I load the buddies of a player from the server? Since I saw that option on the F3 settings, I thought they wouldnīt be saved on the clients buddyaccounts.txt. Or am I wrong?
The playerlist handles most of this already, and the list of players synced with the server should be written out to scriptfiles/groupBuddies.txt. I would suggest editing this file is not a great idea; I think changes will be overwritten on next connect.
Reply With Quote
  #5  
Old 01-10-2012, 03:10 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Skyld View Post
Most of the functions in the playerlist script are not public anyway; the only interesting functions are:
Thanks. Maybe I can get some use of them. Will mess around with them when I'm on the computer.

Quote:
Originally Posted by Skyld View Post
I would suggest editing this file is not a great idea; I think changes will be overwritten on next connect.
No I didn't want to overwrite them, just wanted to test something where I need to load the buddies (stored on client and on the server)


EDIT:

anyPmsWaiting() is there any way to check whos PMīs are still waiting to get checked?
---Nevermind figured out that I can use player.pmswaiting()---


Another Edit:
Have been using something like this (just a part of the script):
code
My problem: The PM window wonīt open, instead of that I get like 15 windows opened with a PM window from that player but no text. Already tried looking at other scripts where it has been working but donīt seem to get it working.
Attached Thumbnails
Click image for larger version

Name:	Unbenannt.png
Views:	173
Size:	39.2 KB
ID:	54174  
__________________
MEEP!

Last edited by callimuc; 01-10-2012 at 07:49 PM..
Reply With Quote
  #6  
Old 02-11-2012, 10:33 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by callimuc View Post
Have been using something like this (just a part of the script):
code
My problem: The PM window wonīt open, instead of that I get like 15 windows opened with a PM window from that player but no text. Already tried looking at other scripts where it has been working but donīt seem to get it working.
Just wanted to follow up this post. I read the code in the playerlist and I think the reason you're having this issue is because you can't PM yourself. Try opening the PM object of another player and it should work fine. I'll see about either fixing it or returning nothing when you try to open your own PM window.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #7  
Old 02-12-2012, 03:00 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Tigairius View Post
Just wanted to follow up this post. I read the code in the playerlist and I think the reason you're having this issue is because you can't PM yourself. Try opening the PM object of another player and it should work fine. I'll see about either fixing it or returning nothing when you try to open your own PM window.
It happened with every player. Also I think that one was my RC which you can actually PM.
__________________
MEEP!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:28 PM.


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