-
Posts
122 -
Joined
-
Last visited
-
Days Won
3 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Zetsu
-
-
Thanks! It's something simple, anyway...
-
import grp self.buttonName.SetTextColor(grp.GenerateColor(1.0, 0.7843, 0.0, 1.0))
Max values for: grp.GenerateColor(1.0, 1.0, 1.0, 1.0)
-
Hello,
I want to show you a new guide to make a communication between quest and client. Nowdays we can use game source..bla bla... but if you don't want/don't know how to compyle it, you can use this version (old and good). So, let's begin:
### Send informations to clientSpoilerFor quest, we have a command... very simple to use and known by everybody(i guess, haha).
quest communication_test begin -- QUEST NAME MUST BE communication_test.quest !!! state start begin when login begin local number = 5 cmdchat("command_name " .. number ) -- So, we'll find 'command_name' in client, in game.py. This is very important, so use a good name...Check if it doesn't exist end end end
For client we have to add in game.py this:
Look for:def __ServerCommand_Build(self): serverCommandList={
Add under this:
"command_name" : self.command_name_python,
Now we must create the function in python with name command_name_python or everything you used..
Be careful! You must align text(functions..etc) with TAB key space.
### Start a quest from client (for buttons sometimes...)SpoilerThe quest looks like this:
quest communication_test begin -- QUEST NAME MUST BE communication_test.quest !!! state start begin when login begin cmdchat("quest_name_index "..q.getcurrentquestindex()) --- this command send quest index to client, you'll see now why is important end when button or info begin say("Zetsu: It works! Quest is active.") end end end
For client we have to add in game.py this:
Look for:def __ServerCommand_Build(self): serverCommandList={
Add under this:
"quest_name_index" : self.YOuCanUseAnyName,
Now, create a function which must looks like:
def YOuCanUseAnyName(self, questindex): constInfo.QUESTNAMEINDEX = questindex # you can use int(questindex) but in special cases
Before the most important thing, we must open constInfo.py and add:QUESTNAMEINDEX = 0
Without any space in front!
Now, everywhere in python you can use this function:def FunctionName(self): import event import constInfo event.QuestButtonClick(int(constInfo.QUESTNAMEINDEX))
Especially for buttons...But you can use it anyway. Don't make this function to be started by quest, cause you will get a "loop", so quest will be actived for infinite times(now it depends how did you code it).
### Get a variable from client (now for 34 & 40k update)SpoilerThis trick is very important and you must read all the steps carefuly
Quest looks like:quest communication_test begin -- QUEST NAME MUST BE communication_test.quest !!! state start begin when login begin cmdchat("quest_name_index "..q.getcurrentquestindex()) end function GetFromClient() cmdchat("init_getInfo") local variables = input(cmdchat("getInfo")) cmdchat("ignore_getInfo") return variables end when button or info begin local things = communication_test.GetFromClient() say(things) -- you can convert it with tonumber("") tostring(0) end end end
For client we have to add in game.py this:
Look for:def __ServerCommand_Build(self): serverCommandList={
Add under this:
"init_getInfo" : self.InitTutorialGetInfo, "getInfo" : self.GetInfoTutByZetsu, "ignore_getInfo" : self.IgnoreTutorialGetInfo,
We should start with constInfo. Add these cariables:
IGNORE_GETINFO = 0INFORMATION_TO_SEND = "m2dev-tutByZetsu"
Now, we move to interfacemodule.py
########################## For 34k+ versions you have: ########def OpenQuestWindow(self, skin, idx): wnds = () q = uiQuest.QuestDialog(skin, idx) q.SetWindowName("QuestWindow" + str(idx)) q.Show() if skin: q.Lock() wnds = self.__HideWindows() # UNKNOWN_UPDATE q.AddOnDoneEvent(lambda tmp_self, args=wnds: self.__ShowWindows(args)) # END_OF_UNKNOWN_UPDATE if skin: q.AddOnCloseEvent(q.Unlock) q.AddOnCloseEvent(lambda s = self, qw = q: s.__dict__.__getitem__("wndQuestWindow").remove(qw)) # UNKNOWN_UPDATE self.wndQuestWindow.append(q) # END_OF_UNKNOWN_UPDATE
Replace it with:
def OpenQuestWindow(self, skin, idx): chat.AppendChat(chat.CHAT_TYPE_INFO, str(constInfo.WOD_IGNORE)) if constInfo.IGNORE_GETINFO == 1: # You see :D constInfo variable which stop/start quest window return else: wnds = () q = uiQuest.QuestDialog(skin, idx) q.SetWindowName("QuestWindow" + str(idx)) q.Show() if skin: q.Lock() wnds = self.__HideWindows() # UNKNOWN_UPDATE q.AddOnDoneEvent(lambda tmp_self, args=wnds: self.__ShowWindows(args)) # END_OF_UNKNOWN_UPDATE if skin: q.AddOnCloseEvent(q.Unlock) q.AddOnCloseEvent(lambda s = self, qw = q: s.__dict__.__getitem__("wndQuestWindow").remove(qw)) # UNKNOWN_UPDATE self.wndQuestWindow.append(q) # END_OF_UNKNOWN_UPDATE
#########################For lower versions: ########
-Open uiquest.py
search:def __init__(self,skin,idx):
Under this add:
import constInfo if constInfo.IGNORE_GETINFO == 1: return
######################### Lower Version steps end ########And finally for game.py we have to create these functions:
def InitTutorialGetInfo(self): constInfo.IGNORE_GETINFO = 1 def IgnoreTutorialGetInfo(self): constInfo.IGNORE_GETINFO = 0 def GetInfoTutByZetsu(self): #import net # if you work out of game.py (so delete first # if your script doesn't contain "import net") net.SendQuestInputStringPacket(str(constInfo.INFORMATION_TO_SEND)) # or any information/variable from any module/file
If you add functions at the end of the game.py don't forget that any PY file have the last line empty!### Send multiple informations to client once
SpoilerThe same as we have done at "Send informations to client" but you will use this:
local var1 = 32 local var2 = "zts" local var3 = "m2dev" cmdchat("function_name "..var1.."|"..var2.."|"..var3)
In the client, the same function,but to get variables you will use something like this:
vararray= fromserver.split("|") # fromserver will be "32|zts|m2dev" #for var1: constInfo.VAR_1 = vararray[0] #for var2: constInfo.VAR_2 = vararray[1] #and for var3: constInfo.VAR_3 = vararray[2]
Kind regards and i hope you understood me! Sorry for mistakes.-
2
-
17
-
-
Big like ^^ I saw you added my system, haha.
-
It has technical merit of course but I never understood why people make all these big all-in-one maps like "4 worlds" or the giant Illirea map from KillMoves. You are just loading your players RAM with stuff that is not being used at that moment.
One world, go to other village by portals cause mountains and water don't let you go there
Do you like this idea?
It's stupid when people steal your idea because they don't have a good imagination... It's a little bit sad if you think at that "thiefs".
They want a server but by other people ideas... And their server will be closed in few weeks.
-
Download link for button is up!
https://mega.co.nz/#!3NACCIAK!awo8s2dvUs94E6Pq9O4xMB_LlgjHrkv23XSs1GnDgiM
Sorry for the inconvenience!
-
1
-
-
Hi, so i have put the quest, the navicat, the item_proto, item_list, the tga how put i can open the box what do i have to do? I'm using game 2089
Ok but the dowload link for the button is down
It's just an icon. You can use any.
But i would like to use that
can you pls give me in PM?
I'm busy for the next 6 hrs. After that, i'll solve the link.
-
Hi, so i have put the quest, the navicat, the item_proto, item_list, the tga how put i can open the box what do i have to do? I'm using game 2089
Ok but the dowload link for the button is down
It's just an icon. You can use any.
-
You can use the item or button should appear near energy system(old interface)Hi, so i have put the quest, the navicat, the item_proto, item_list, the tga how put i can open the box what do i have to do? I'm using game 2089
-
If you select an image and use right click on it, a tooltip menu will appear. Then, you must click on the "Save image as..." or "Save image...".
If you want to auto-generate images in your page, use js code to generate html codes by files fro your pictures directory.
Now you're a 'hacker'
I want to Metin2 GF Gallery.
I use FancyBox but icons are different.
Hahahaha
You can edit from html and css.. dafuq :|
-
If you select an image and use right click on it, a tooltip menu will appear. Then, you must click on the "Save image as..." or "Save image...".
If you want to auto-generate images in your page, use js code to generate html codes by files fro your pictures directory.
Now you're a 'hacker'
-
Thanks you so much dude ! You rock !
But link about button are dead.
I'll try to solve it. Thanks!
// Use another icon
-
1
-
-
You can use other format
I have in wmv if you want: Download
or you can convert for whatever you like
for using wmv you just need to edit in intrologo.py the extensions:
gf.mpg -> gf.wmv;
ymir.mpg -> ymir.wmv
Regards
lol, i know how to change file extension in intrologo.py .. wtf
-
1
-
-
Hello,
I need gf.mpg and ymir.mpg for intrologo... Can you give me them, please?
Regards!
-
-
Update 13.june.2014 - Take it now! It's still hot.
I decided to add Gift box item!
About it:
Vnum: 17609
Use from level: 10
Can be used for: infinite times (you decide that)
Can: -
Can't: be stored, traded, sold.
Icon:
New quest update:
Go to first page and take from there!
-
#closereq
-
0605 17:18:26398 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR 0605 17:18:28072 :: GRANNY: r:/granny/rt/granny_file_info.cpp(145): File has run-time type tag of 0x8000000f, which doesn't match this version of Granny (0x80000010). Automatic conversion will be attempted. 0605 17:18:36121 :: Traceback (most recent call last): 0605 17:18:36122 :: File "networkModule.py", line 231, in SetGamePhase 0605 17:18:36122 :: File "system.py", line 130, in __pack_import 0605 17:18:36122 :: File " 0605 17:18:36122 :: <string> 0605 17:18:36122 :: ", line 0605 17:18:36122 :: 107 0605 17:18:36122 :: 0605 17:18:36122 :: 0605 17:18:36122 :: self.stream=stream 0605 17:18:36122 :: 0605 17:18:36122 :: ^ 0605 17:18:36128 :: SyntaxError 0605 17:18:36128 :: : 0605 17:18:36128 :: invalid syntax 0605 17:18:36128 ::
hii man wow its rly make u lose ur mind
but I have some proplem I hope u can fix it
my syserr:
I need your game.py in private.
-
With
event.QuestButtonClick(int(questIndex))
You need
when button or info begin ##DO SOMETHING end
In your quest. Look in uiquest.py and you will see that buttons works like that. Quests are started (don't know how..) and event.QuestButtonClick(int(questIndex)) it's used for gui buttons
You can use event.QuestButtonClick(int(questIndex)) everywhere. In game.py add in def __init__ this:
self.MyQuestNameIndex = 0
In ServerCommand...etc
add:
"myvalue" : self.InitMyQuestName,
Then make this function
def InitMyQuestName(self, id): self.MyQuestNameIndex = int(id) # i added int just in case... #Be careful! I used SPACE not TAB. You will get syntax errors if you don't replace it.
then you can use event.QuestButtonClick(self.MyQuestNameIndex)
if you want to use it everywhere in your client, then use constInfo instead of self.MyQuestNameIndex
I'm not sure if you understood me... More details: http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2355018-release-client-quest-kommunikation.html
You have here everything, also how to get a value from client and use it in your quest
I've already done everything you wrote in my first post (it seems that you missunderstood me, otherway you wouldnt post it^^)
But thanks for the Link, this may be useful.
Is it possible that:
self.ResetChat() or return in my if clause are blocking the quest? (To display it)
Cuz everything is working without errors and problems, but it doesnt show the quest (Already checked QuestIndex, everything is right)
I would like to see self.ResetChat() function.
If this function isn't right or it doesn't exist, curent function (with event.QuestButtonClick(int(questIndex))) doesn't work.
Syserr would be nice too...!
-
With
event.QuestButtonClick(int(questIndex))
You need
when button or info begin ##DO SOMETHING end
In your quest. Look in uiquest.py and you will see that buttons works like that. Quests are started (don't know how..) and event.QuestButtonClick(int(questIndex)) it's used for gui buttons
You can use event.QuestButtonClick(int(questIndex)) everywhere. In game.py add in def __init__ this:
self.MyQuestNameIndex = 0
In ServerCommand...etc
add:
"myvalue" : self.InitMyQuestName,
Then make this function
def InitMyQuestName(self, id): self.MyQuestNameIndex = int(id) # i added int just in case... #Be careful! I used SPACE not TAB. You will get syntax errors if you don't replace it.
then you can use event.QuestButtonClick(self.MyQuestNameIndex)
if you want to use it everywhere in your client, then use constInfo instead of self.MyQuestNameIndex
I'm not sure if you understood me... More details: http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2355018-release-client-quest-kommunikation.html
You have here everything, also how to get a value from client and use it in your quest
-
1
-
-
Link:
Enjoy! No time to describe... I want it. xD
-
1
-
-
Virtual-box says
every time I active the quest
Calls undeclared function! : mysql_query abort (core dumped)
http://metin2dev.org/board/topic/1142-releasegift-system-feedtheplayers-d/?p=8780
-
I honestly do not know what I'm Zetsu in your team, or how you do not really understand or Metin2? times such luck.
// Learn english and stop off-topic comments.
My name in developers list
-
app.sleep stop the game. In 10 minutes i will come with my timer version
I took it from switchbot xD
//posted by Aveline... sry
[ReQuest] gift box quest ..
in Community Support - Questions & Answers
Posted
(one each 30minutes)
To be used by player or auto-open it at 30min.?
You know that quest have
pc.setqf("giftsystemuse", get_time()+60*30) -- 30 mins
cmdchat("giftsyshide") -- this hide the box