Ejderha Ruleti Sistemi

LDrago

The Dragon's Excalibur
MT Üye
Mesaj
172
Çözümler
1
Beğeni
191
Puan
729
Ticaret Puanı
0
Merhaba arkadaşlar.Ejderha Ruleti Sistemi ni paylaşıcam.Sistemin hakkında bilgi verem.Bu sistemde 8 tane tüp vardır.Bu tüpleri slotları kesip doldurunca size rasgele bi eşya veriyor.Verilen eşyayı quest den ayarlaya bilirsiniz

Anlatım.


ConstInfo py Açın ve Ekleyın

Kod:
Genişlet Daralt Kopyala
uiRoulette = { "index" : 0, "kugel": 0, "max_points": 0, "points": 0}}

Game py Açın Importlara Ekleyın
Kod:
Genişlet Daralt Kopyala
import uiRoulette

Aratın
Kod:
Genişlet Daralt Kopyala
def __init__(self, stream):

En Altına Ekleyın
Kod:
Genişlet Daralt Kopyala
self.Roulette = uiRoulette.RouletteWindow()

Aratın
Kod:
Genişlet Daralt Kopyala
def Close(self):

En Altına Ekleyın

Kod:
Genişlet Daralt Kopyala
 if self.Roulette.IsShow():
self.Roulette.Open()

Aratın

Kod:
Genişlet Daralt Kopyala
def __ServerCommand_Build(self):

Ekleyın

Kod:
Genişlet Daralt Kopyala
 "uiRoulette" : self.__uiRoulette,
"uiRoulette_open" : self.__uiRouletteOpen,

En Alta Ekleyın

Kod:
Genişlet Daralt Kopyala
 def __uiRoulette(self, info):
CMD = info.split("/")
if CMD[0]=="index":
constInfo.uiRoulette["index"] = int(CMD[1])
elif CMD[0]=="gui":
constInfo.uiRoulette["kugel"] = int(CMD[1])
constInfo.uiRoulette["max_points"] = int(CMD[2])
constInfo.uiRoulette["points"] = int(CMD[3])

def __uiRouletteOpen(self):
self.Roulette.Open()

Linkleri görebilmek için giriş yap veya kayıt ol.


Linkleri görebilmek için giriş yap veya kayıt ol.


Kodları ekledikten sonra Rar içindeki uiroulette.py yi rotta atıp paketleyin.roulette.epk,roulette.eix i packa atın ve Index e
roulette
pack/
ı ekleyin.Daha sonra drachenroulette.quest questi okutun

Index böyle olsun
o9ND8X.png






KANIT
vRAXVz.jpg


exp ve ödülleri questten ayarlıyabilirsinz exp şu anda 101 kodlu mobta yani köpekte

Güncelleme:

1. Open your questdirectory.
2. Insert there the drachenroulette.quest
3. Add the quest name to the quest_list/locale_list
4. Reload your quests and after that, restart the server

5. Prise
- In the quest you can find a function called config,
in this function are the following variables:
POINTS_FOR_SPHERE -> maximal points for one sphere
MAX_SPHERE_COUNT -> Don't change this, its constant.
MONSTER -> in this list, you can insert special monster, which should give more points than its level
REWARDS -> in this list, you can insert all items (stackable or not). These items will be randomly selected, if the button, when all spheres are full,
is clicked

6. the mob.level function:
Search in your .lua files eg your questlib.lua for the mysql_query function. Put under this function the following code
and add the function 'mob.level' to your quest_functions

Kod:
Genişlet Daralt Kopyala
out= mysql_query("SELECT * FROM player.mob_proto;")
mob._data =out
mob._idx ={}
table.foreach(out.vnum,
function(i,p)
mob._idx[p]=i 
end
)

setmetatable(mob,{
__index =function(this,idx)
ifthis._data[idx]~=nilthen
returnfunction(moid)
returnthis._data[idx][this._idx[moid]]
end
else
returnfunction()return0end
end
end
}
)

Fonksiyon bu yabancı forumdan alıntırdır... ne yapıcağnız yazıyor
 
Uyarı: Bu konu açıldığından bu yana baya zaman geçmiş.
Muhtemelen daha fazla tartışma gerekli değildir ki bu durumda yeni bir konu başlatmayı öneririz. Eğer yine de cevabınızın gerekli olduğunu düşünüyorsanız buna rağmen cevap verebilirsiniz.
Geri
Üst