• 01-04.05.2026 - DOUBLE EXP / SKILL EVENT!

Inne [8.54] Look

Status
Zamknięty.

Iggared

User
Zarejestrowany
Dołączył
Listopad 8, 2010
Posty
15
Liczba reakcji
0
Witam. Problem by? mo?e banalny, ale poch?ona? sporo mojego czasu bez ?adnych efekt?w. Mianowicie, po klikni?ciu "look" na posta? nie wyskakuje mi informacja na zielono o profesji, levelu itd... Nie wiem, jak sobie z tym poradzi?.

Z g?ry dzi?kuje, za pomoc dla takiego nowicjusza jak ja :P
 
Odp: [8.54] Look

W creatureevents przejrzyj skrypty i zobacz czy nie masz czego? z onLook.
 
Odp: [8.54] Look

To to samo.
Otw?rz creaturescripts.xml i zobaczy czy nie ma tam nigdzie type="look".
 
Odp: [8.54] Look

Faktycznie jest takie co?, co z tym zrobi?, usunac czy zmienic?

Sytuacja dok?adnie rzecz biorac prezentowa?a si? tak, ?e po u?yciu look pokazywa?o mi informacj? o zrobionych questach, a w miejscu gdzie zawsze wyskakuje informacja o muted czy exhaust, wcia? przy u?yciu look wyskakuje mi informacja "Nick look at you" czy co? w tym rodzaju...
 
Ostatnia edycja:
Odp: [8.54] Look

Zale?y co to jest.
Znajd? ?cie?k? do skryptu i poka? go.
 
Odp: [8.54] Look

Kod:
function onLook(cid, thing, position, lookDistance)
local quests = {
	2400, 2401, 2402, 2403 -- Change/add numbers to the unique ids on your quest chests.
}

local completed = {}
	if isPlayer(thing.uid) then
		for i = 1, #quests do
			if getPlayerStorageValue(thing.uid, quests[i]) > 0 then
					table.insert(completed, 1)
			end
		end
			doPlayerSetSpecialDescription(thing.uid, (getPlayerSex(thing.uid) == 0 and ".\nShe" or ".\nHe") .. " has completed ".. #completed .. "/" .. #quests .. " quests")
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPlayerName(thing.uid) .. " has completed " .. #completed .. "/" .. #quests .. " quests.")
		end
	return true
end
 
Odp: [8.54] Look

Skrypt pokazuje ilo?? zrobionych quest?w [storage w tablicy quests], je?eli nie wiesz o jakie questy chodzi to wejd? w login.lua i usu? to zdarzenie.
 
Odp: [8.54] Look

No tak zrobi?em, ale wcia? nie pokazuje mi profesji ani nic w tym rodzaju (chodzi mi o napis na zielono na ?rodku ekranu i w serverlog. Jakie? pomys?y?
 
Odp: [8.54] Look

Je?eli usun??e? z login.lua to zdarzenie to musi dzia?ac, chyba, ?e s? inne zdarzenia look.

No i zgaduj?, ?e po usuni?ciu i wpisaniu /reload creaturescripts nie przelogowa?e? si?.
 
Odp: [8.54] Look

Zresetowa?em ca?y silnik wi?c wprowadzone zmiany chyba jednak zaistnia?y, biorac pod uwag? to, ?e nie wyskakuje mi ju? komunikat o questach tak jak to mia?o miejsce przed usuni?ciem

Teraz w konsoli wyskakuje mi komunitak tego typu, gdy daje "look"

Kod:
[23/07/2013 18:48:43] [Error - CreatureScript Interface] 
[23/07/2013 18:48:43] buffer:onLook
[23/07/2013 18:48:43] Description: 
[23/07/2013 18:48:43] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[23/07/2013 18:48:43] stack traceback:
[23/07/2013 18:48:43] 	[C]: in function 'error'
[23/07/2013 18:48:43] 	data/lib/004-database.lua:60: in function 'getDataInt'
[23/07/2013 18:48:43] 	[string "rep = {..."]:36: in function 'getPoints'
[23/07/2013 18:48:43] 	[string "loadBuffer"]:15: in function <[string "loadBuffer"]:2>

Je?eli to pomo?e, znalaz?em t? linijk?

Kod:
function Result:getDataInt(s)
	if(self:getID() == -1) then
		error("[Result:getDataInt] Result not set!")
	end
 
Ostatnia edycja:
Odp: [8.54] Look

Masz jaki? inny skrypt z onLook.
Dot. punkt?w reputacji.
 
Odp: [8.54] Look

W creaturescript nie mam ju? nic zwiazanego z onLook :<
 
Odp: [8.54] Look

Poka? creaturescripts.xml i login.lua
 
Odp: [8.54] Look

Kod:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
	<event type="login" name="PlayerLogin" event="script" value="login.lua"/>
	<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
	<event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
	<event type="receivemail" name="Mail" event="script" value="mail.lua"/>
	<event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>
	<event type="think" name="Idle" event="script" value="idle.lua"/>
	<event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
	<event type="textedit" name="BanBook" event="script" value="banbook.lua"/>
	<event type="kill" name="SummonKill" event="script" value="obsidianknife.lua"/>
	<event type="login" name="obs_login" event="script" value="obsidianknife.lua"/>
	<event type="death" name="ObMonsterCheck" event="script" value="obsidianknife.lua"/>
	<event type="login" name="Outfitek" event="script" value="outfitek.lua"/>
</creaturescripts>

Kod:
local config = {
	loginMessage = getConfigValue('loginMessage'),
	useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
	local loss = getConfigValue('deathLostPercent')
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

	local accountManager = getPlayerAccountManager(cid)
	if(accountManager == MANAGER_NONE) then
		local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
		if(lastLogin > 0) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
			str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
		else
			str = str .. " Please choose your outfit."
			doPlayerSendOutfitWindow(cid)
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
	elseif(accountManager == MANAGER_NAMELOCK) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
	elseif(accountManager == MANAGER_ACCOUNT) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
	else
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
	end

	if(not isPlayerGhost(cid)) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end

	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end
		registerCreatureEvent(cid, "Mail")
		registerCreatureEvent(cid, "AdvanceSave")
		registerCreatureEvent(cid, "GuildMotd")
		registerCreatureEvent(cid, "Idle")
		registerCreatureEvent(cid, "questLook")
		registerCreatureEvent(cid, "Outfitek")
	return true
end

Usuna?em ju?
Kod:
registerCreatureEvent(cid, "questLook")

Nadal nie pomog?o
 
Ostatnia edycja:
Odp: [8.54] Look

Usu? "registerCreatureEvent(cid, "questLook")", a jak to nic nie da to poka? mi outfitek.lua i obs_login.
Pami?taj oczywi?cie o przelogowaniu si?. Najlepiej zresetuj serwer.
 
Odp: [8.54] Look

Outfitek.lua zosta? usuni?ty, sciagnalem go z neta chcac dopasowac profesja looktype. Co do obs_login, gdzie go znajde?
 
Odp: [8.54] Look

obs_login.lua tam gdzie reszt?.
 
Odp: [8.54] Look

obs_login.lua, nie mam tego pliku w creaturescript

Ups, ma?a obsuwa :<

Kod:
function onLogin(cid)
	registerCreatureEvent(cid, SummonKill)

	return true
end

function onKill(cid, target)
	if isMonster(target) and isPlayer(getCreatureMaster(target)) then
		registerCreatureEvent(target, ObMonsterCheck)
	end

	return true
end

function onDeath(cid, corpse)
	doItemSetAttribute(corpse.uid, aid, 91347)

	return true
end

Napisane jest, ?e do tego pliku skryptem jest obsidianknife.lua, wi?c to jego skopiowa?em. Mam nadziej?, ?e si? nie pomyli?em xd
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry