• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

doCreatureSay

Blizny

New Member
Joined
Jun 26, 2012
Messages
107
Reaction score
2
Location
Poland / Bydgoszcz
Właśnie dodaje inq na serwer ale mam problem, ponieważ po wejściu w teleport wywala mi debuga który powoduje wyłączenie tibi...
Szukałem błędu... i znalazłem... zaznaczyłem go na czerwono

Code:
local config = {
bosses={---aid of portal, position where it sends, value it sets, text it shows
[4001] = {pos={x=999, y=812, z=14, stackpos=1}, value=1, text="Entering The Crystal Caves"},
[4002] = {pos={x=33371, y=31613, z=14, stackpos=1}, value=2, text="Entering The Blood Halls"},
[4003] = {pos={x=33153, y=31781, z=12, stackpos=1}, value=3, text="Entering The Vats"},
[4004] = {pos={x=33038, y=31753, z=15, stackpos=1}, value=4, text="Entering The Arcanum"},
[4005] = {pos={x=33199, y=31686, z=12, stackpos=1}, value=5, text="Entering The Hive"},
[4006] = {pos={x=33111, y=31682, z=12, stackpos=1}, value=6, text="Entering The Shadow Nexus"}
},
mainroom={---aid, position, lowest value that can use this portal, text
[5001] = {pos={x=999, y=812, z=14, stackpos=1}, value=1, text="Entering The Crystal Caves"},
[5002] = {pos={x=33371, y=31613, z=14, stackpos=1}, value=2, text="Entering The Blood Halls"},
[5003] = {pos={x=33153, y=31781, z=12, stackpos=1}, value=3, text="Entering The Vats"},
[5004] = {pos={x=33038, y=31753, z=15, stackpos=1}, value=4, text="Entering The Arcanum"},
[5005] = {pos={x=33199, y=31686, z=12, stackpos=1}, value=5, text="Entering The Hive"}},
portals={---aid, position, text
[6000] = {pos={x=1012, y=899, z=12}, text="Escaping back to the Retreat!"},
[6001] = {pos={x=1030, y=994, z=11}, text="Entering The Ward of Ushuriel"},
[6002] = {pos={x=33169, y=31755, z=13}, text="Entering The Undersea Kingdom"},
[6003] = {pos={x=33124, y=31692, z=11}, text="Entering The Ward of Zugurosh"},
[6004] = {pos={x=33356, y=31590, z=11}, text="Entering The Foundry"},
[6005] = {pos={x=33197, y=31767, z=11}, text="Entering The Ward of Madareth"},
[6006] = {pos={x=33250, y=31632, z=13}, text="Entering The Battlefield"},
[6007] = {pos={x=33232, y=31733, z=11}, text="Entering The Ward of The Demon Twins"},
[6008] = {pos={x=33094, y=31575, z=11}, text="Entering The Soul Wells"},
[6009] = {pos={x=33197, y=31703, z=11}, text="Entering The Ward of Annihilon"},
[6010] = {pos={x=33105, y=31734, z=11}, text="Entering The Ward of Hellgorak"}},

storage=4000,---storage used in boss and mainroom portals
e={}}----dunno whats this but have to be like this to make doCreatureSayWithDelay working, DON'T TOUCH}
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
if(config.bosses[item.actionid]) then
local t= config.bosses[item.actionid]
if getPlayerStorageValue(cid, config.storage)< t.value then
setPlayerStorageValue(cid, config.storage, t.value)
end
doTeleportThing(cid, t.pos)
doSendMagicEffect(getCreaturePosition(cid),10)
[B][COLOR="#FF0000"]doCreatureSay(cid,t.text,19,1, config.e)[/COLOR][/B]
elseif(config.mainroom[item.actionid]) then
local t= config.mainroom[item.actionid]
if getPlayerStorageValue(cid, config.storage)>=t.value then
doTeleportThing(cid, t.pos)
doSendMagicEffect(getCreaturePosition(cid),10)
[B][COLOR="#FF0000"]doCreatureSay(cid,t.text,19,1,config.e)[/COLOR][/B]
else
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid, 'You don\'t have enough energy to enter this portal', TALKTYPE_ORANGE_1)
end
elseif(config.portals[item.actionid]) then
local t= config.portals[item.actionid]
doTeleportThing(cid, t.pos)
doSendMagicEffect(getCreaturePosition(cid),10)
[B][COLOR="#FF0000"]doCreatureSay(cid,t.text,19,1,config.e)[/COLOR][/B]
end
end
end



doCreatureSay(cid,t.text,19,1,config.e)


Próbowałem wymyśleć coś sam....
x
Code:
doCreatureSay(cid, '"..t.text.."', TALKTYPE_ORANGE_1)
x
Code:
doCreatureSay(cid, '"..config.e.."', TALKTYPE_ORANGE_1)
x
Code:
doCreatureSay(cid,t.text,19,1,config.e, TALKTYPE_ORANGE_1)
x
Code:
doPlayerSendTextMessage(cid, '"..text.."', TALKTYPE_ORANGE_1)

Jednak to nie działa :(

Dodam że tibia 9.42
 
Last edited:
może jakoś w nowszych clientach funkcja doCreatureSay się trochę zmieniła?

wklej mi swój constant.lua z libów
 
Wywal tą linijke i daj po prostu:

doCreatureSay(cid, "Potar MISTRZ", TALKTYPE_ORANGE_1)

Do sprawdzenia, i tak ja semi mówi daj const.lua.
 
Ale wlasnie chodzi o to ze w zaleznosci od wejscia w teleport ma mowic dany tekst a ty potar podales kod ktory dziala tak ze jak wejde w jakis tp obojetnie jaki zawsze ten sam tekst sie wyswietla a ja chcialbym taki tekst jak tu pisze

[4001] = {pos={x=999, y=812, z=14, stackpos=1}, value=1, text="Entering The Crystal Caves"},
[4002] = {pos={x=33371, y=31613, z=14, stackpos=1}, value=2, text="Entering The Blood Halls"},
[4003] = {pos={x=33153, y=31781, z=12, stackpos=1}, value=3, text="Entering The Vats"},
[4004] = {pos={x=33038, y=31753, z=15, stackpos=1}, value=4, text="Entering The Arcanum"},
[4005] = {pos={x=33199, y=31686, z=12, stackpos=1}, value=5, text="Entering The Hive"},
[4006] = {pos={x=33111, y=31682, z=12, stackpos=1}, value=6, text="Entering The Shadow Nexus"}
 
Nie rozumiem jak to dodać ?:P

Problem rozwiązany obczaiłem jak to działa w innym skrypcie :P :PP

doCreatureSay(cid,config.portals[item.actionid].text,config.texttype)
 
Last edited:
Back
Top