What's new

Skrypty & Kody [Tibia 7.60] - kilka skrypt?w.

Status
Not open for further replies.

Pucek1993

Active User
Joined
Feb 4, 2016
Messages
71
Reaction score
1
Cze??, potrzebuj? waszej pomocy! A wi?c...

Chcia?bym aby poni?szy kod, s?u?y? jako losowanie bossowego potwora, niestety porafi? zrobi? tylko tak, aby w ka?dym osobnym pliku by? tylko jeden potw?r. Tak?e, prosz? o przerobienie mi skryptu abym dopisywa? potwory tylko do tabeli, np. tak ..

PHP:
local monsters = { "Dragon", "Demodras", "Dragon Lord"}
                            =                   =                 =
local bosses= { "Boss Dragon", "Boss Demodras", "Boss Dragon Lord"}

PHP:
function onKill(cid, target, corpse)

local boss = math.random(100,100)
if getCreatureName(target) == 'Rat' then
doPlayerSendTextMessage(cid,22,"Tekst testowy!")
  if boss == 100 then
doSummonCreature('Rat', getPlayerPosition(cid))
end
end
end

I oczywi?cie wa?na jest tutaj szansa na walk? z bossem. Funkcj? isMonster dopiero musz? doda? do silnika.

Druga sprawa! Potrzebuje skrypt, do creaturescripts kt?ry pozwoli mi na dodanie dodatkowego loota, do wszystkich potwor?w. Potrafi? zrobi? tak, ?e item pojawia si? w plecaku gracza - a ja chcia?bym aby pojawi? si? w ciele potwora, kt?ry zosta? zabity.

Dzi?kuj? z g?ry za wszelk? pomoc :)
 

Ciamciaj Bigos

ก้้้้้้&
Joined
Jun 6, 2013
Messages
2,081
Reaction score
192
Odp: [Tibia 7.60] - kilka skrypt?w.

[lua]local tbl = {
["dragon"] = {boss = "dragon boss"},
["rat"] = {boss = "rat boss"}
}

function onKill(cid, target, corpse)
local monster = tbl[getCreatureName(target)]
local boss = math.random(100,100)
if getCreatureName(target) == monster then
if boss == 100 then
doSummonCreature(monster.boss, getPlayerPosition(cid))
end
end
return true
end[/lua]
 

Pucek1993

Active User
Joined
Feb 4, 2016
Messages
71
Reaction score
1
Odp: [Tibia 7.60] - kilka skrypt?w.

Niestety nie dzia?a, brak b??d?w w konsoli.
 

Pucek1993

Active User
Joined
Feb 4, 2016
Messages
71
Reaction score
1
Odp: [Tibia 7.60] - kilka skrypt?w.

Dalej potrzebuj? pomocy!

---------- Tre?? dodana o 21:08 ----------

Dalej potrzebuj? pomocy!
 

Pucek1993

Active User
Joined
Feb 4, 2016
Messages
71
Reaction score
1
Odp: [Tibia 7.60] - kilka skrypt?w.

PHP:
function onKill(cid, target, corpse)
 
local monsters = {"Dragon", "Demodras", "Dragon Lord"}

local boss = math.random(100,100)
if getCreatureName(target) == monsters then
  if boss == 100 then
doSummonCreature('Rat', getPlayerPosition(cid))
end
end
end

Dlaczego nie dzia?a mi powy?szy skrypt?
 
Status
Not open for further replies.
Top