[Release]PetGui Design

08/07/2014 16:17 KilleRzZ™#1
Hello Guys today i post this petgui design :D is not completed but you can edit it easy :) :D

First of all this is a photo:
[Only registered and activated users can see links. Click Here To Register...]


Now open game.py:
and find:
Quote:
self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
and down put this:
Quote:
##START_PETGUI BY KilleRzZ
PetGuiBg = ui.AniImageBox()
PetGuiBg.AddFlag("not_pick")
PetGuiBg.AppendImage("d:/ymir work/ui/petgui.dds")
self.PetGuiBg = PetGuiBg

self.PetGuiBg.SetPosition(wndMgr.GetScreenWidth()-460,0)

self.PetLevel = ui.TextLine()
self.PetLevel.SetDefaultFontName()
self.PetLevel.SetPosition((wndMgr.GetScreenWidth()-460)+90, 105)
self.PetLevel.SetText("Haustierlevel: NONE")
self.PetLevel.SetOutline()

self.PetBonus1 = ui.TextLine()
self.PetBonus1.SetDefaultFontName()
self.PetBonus1.SetPosition((wndMgr.GetScreenWidth( )-460)+145, 81)
self.PetBonus1.SetText("1.Bonus: NONE")
self.PetBonus1.SetOutline()

self.PetBonus2 = ui.TextLine()
self.PetBonus2.SetDefaultFontName()
self.PetBonus2.SetPosition((wndMgr.GetScreenWidth( )-460)+145, 95)
self.PetBonus2.SetText("2.Bonus: NONE")
self.PetBonus2.SetOutline()

self.PetBonus3 = ui.TextLine()
self.PetBonus3.SetDefaultFontName()
self.PetBonus3.SetPosition((wndMgr.GetScreenWidth( )-460)+145, 107)
self.PetBonus3.SetText("3.Bonus: NONE")
self.PetBonus3.SetOutline()

PetExpBar = ui.AniImageBox()
PetExpBar.AddFlag("not_pick")
PetExpBar.AppendImage("d:/ymir work/ui/pattern/charbar_main_yellow.tga")
PetExpBar.SetPercentage(0,1)
self.PetExpBar = PetExpBar

self.PetExpBar.SetPosition((wndMgr.GetScreenWidth( )-460)+120, 62)

self.PetExpLabel = ui.TextLine()
self.PetExpLabel.SetDefaultFontName()
self.PetExpLabel.SetPosition((wndMgr.GetScreenWidt h()-460)+180, 65)
self.PetExpLabel.SetText("0%")
self.PetExpLabel.SetOutline()

##CLOSE_PETGUI BY KilleRzZ

after this find this:
Quote:
def __ServerCommand_Build(self):
serverCommandList={
and down put this:
Quote:
##PETGUI BY KilleRzZ
"ShowPetGui" : self.__showpetgui,
"HidePetGui" : self.__hidepetgui,
"HaustierLevel" : self.__PetLevel,
"HaustierBonus1" : self.__PetBoni1,
"HaustierBonus2" : self.__PetBoni2,
"HaustierBonus3" : self.__PetBoni3,
"PetProcentExp" : self.__PetExp,
##
and in the end of game.py put this

Quote:
def __PetLevel(self, HaustierLevel):
self.PetLevel.SetText(" " + HaustierLevel)

def __PetBoni1(self, HaustierBonus1):
self.PetBonus1.SetText(" " + HaustierBonus1 + " STR")

def __PetBoni2(self, HaustierBonus2):
self.PetBonus2.SetText(" " + HaustierBonus2 + " DEF")

def __PetBoni3(self, HaustierBonus3):
self.PetBonus3.SetText(" " + HaustierBonus3 + " HP")

def __PetExp(self, PetProcentExp):
self.PetExpLabel.SetText(PetProcentExp + "%")
self.PetExpBar.SetPercentage(PetProcentExp, 100)
now you need to download this files:[Only registered and activated users can see links. Click Here To Register...].... and put it in your pack and put at your client index file name to like this:
Quote:
Killerz
*
We have end from client side! now server side (i have take the quest from DasKuchen and i have edit it)

this is the quest:
Quote:
quest pets begin
state start begin

function givebonus(x)
local y,boni = {53,54,1},pets.bonusliste()
table.foreach(boni[x],function(i,l) cmdchat("HaustierBonus"..i.." "..l.."") affect.add_collect(y[i],l,60*60*24*365*60) end )
cmdchat("HaustierLevel "..pc.getqf('petlevel').."")
cmdchat("HaustierName "..pc.get_name().."")
pc.setqf("petruf",1)
end
function bonusliste()
return {
[1] = {200,100,500},
[2] = {250,150,1000},
[3] = {300,200,1500},
[4] = {350,250,2000},
[5] = {400,300,3000},
}
end
function removebonus(x)
local y,boni = {53,54,1},pets.bonusliste()
table.foreach(boni[x],function(i,l) affect.remove_collect(y[i],l,60*60*24*365*60) end )
pc.setqf("petruf",0)
cmdchat("HidePetGui")
cleartimer("bugcheck")
end

when 53001.use or 53010.use or 53011.use or 53017.use or 53003.use or 53005.use or 53009.use or 53012.use or 53010.use or 53013.use or 53016.use begin
if pc.is_mount() then
say_title("Entschuldigung")
say("Bitte steige von deinem Mount ab!")
return
end
if pc.getqf('petlevel') == 0 then
pc.setqf('petlevel',1)
end
if pc.getqf("petruf") == 0 then
chat("Dein Haustier wurde gerufen.")
pets.givebonus(pc.getqf('petlevel'))
local expprocent1 = {20, 80, 160, 350, 400}
cmdchat("PetProcentExp "..(pc.getqf("exp")/expprocent1[pc.getqf("petlevel")]).."")
cmdchat("ShowPetGui")
loop_timer("bugcheck", 0.2)
elseif pc.getqf("petruf") == 1 then
pets.removebonus(pc.getqf('petlevel'))
chat("Dein Haustier verabschiedet sich nun.")
end
end


when kill with pc.getqf("petruf") == 1 begin
if pc.getqf("petlevel") == 5 then
return
end
if not npc.is_pc() then
pc.setqf("exp",pc.getqf("exp")+1)
local exp2up = {2000, 8000, 16000, 35000, 40000}
local expprocent = {20, 80, 160, 350, 400}
cmdchat("PetProcentExp "..(pc.getqf("exp")/expprocent[pc.getqf("petlevel")]).."")
if pc.getqf("exp") == exp2up[pc.getqf("petlevel")] then
if pc.getqf("petlevel") == 4 then
say_title("Herzlichen Glόckwunsch")
say("Dein Haustier erreicht Level "..(pc.getqf("petlevel")+1).."")
say_reward("Dies war das letzte Level!")
end
say_title("Herzlichen Glόckwunsch")
say("Dein Haustier erreicht Level "..(pc.getqf("petlevel")+1).."")
say("Rufe dein Pet bitte erneut!")
pc.setqf("petlevel",pc.getqf("petlevel")+1)
pc.setqf("exp",0)
pets.removebonus(pc.getqf('petlevel'))
end
end
end

when login or logout or disconnect with pc.getqf("petruf") == 1 begin
pets.removebonus(pc.getqf('petlevel'))
chat("Dein Haustier ist nicht mitgekommen...")
chat("Rufe es erneut!")
end

end
end
(This system is not completed so dont be wicked) Thanks <3
08/07/2014 16:47 aok96boom#2
Only 2 words

That's bullshit
08/07/2014 17:24 Prince43™#3
All this people here use 40k Game. Think about youre Release its "Usefull" or "Useless".
Youre Script is so old, use the 40k Petquest and form it with yours.

i know the answer ;)



Kind Regards

Prince43™
08/08/2014 20:23 .Err0xR`#4
Grafik

Man kann die Grafik bei dir nicht sehen :D
hab sie mal reingepackt.

Nice Release! :rolleyes:
08/08/2014 20:43 .Despero™#5
Hab diese gui mit quest auch für +34k games und jedes Pet hat sein eigenes pet aber leider kann ich sie erst nach 2 wochen geben, weil ich im urlaub bin
08/08/2014 21:14 LovecKrys#6
Sorry but this is actually useless
08/08/2014 21:15 DasSchwarzeT#7
Das ist ja sowas von 2012
08/08/2014 23:04 tristano98#8
help me ?


08/09/2014 12:37 aok96boom#9
Like i said it's bullshit use 34/40k files the pet system is better there
08/09/2014 12:39 tristano98#10
utilised rev 40k.
sorry for my bad eng.
08/09/2014 16:52 Kyuso /..#11
Useless, but thanks for release ! :D
08/09/2014 22:37 'oShet#12
Quote:
Originally Posted by aok96boom View Post
Only 2 words

That's bullshit
That's bullshit = 3 words.
08/10/2014 01:26 aok96boom#13
So?
08/11/2014 03:12 asteris77#14
cant you just dont copy others work?
09/05/2014 22:22 yassineland#15
Quote:
Originally Posted by tristano98 View Post
help me ?


in file game.py
line 176
change this:
self.PetExpLabel.SetPosition((wndMgr.GetScreenWidt h()-460)+180, 65)
to this:
self.PetExpLabel.SetPosition((wndMgr.GetScreenWidt h()-460)+180, 65)

i think it also work in 40k files .. no?