Skrypty & Kody Dziwne b??dy w konsoli r.3777

Status
Zamknięty.

Nec

Advanced User
Zarejestrowany
Dołączył
Sierpień 10, 2011
Posty
151
Liczba reakcji
9
Siemka. Wbijam na chara normalnie ale char nie wlogowywuje sie a w konsoli takie co?:

Kod:
[18:22:37.911] GoD UfoX has logged in.

[18:22:38.536] [Error - CreatureScript Interface]
[18:22:38.536]                  domodlib("config_fire_storm_event")
[18:22:38.536]
[18:22:38.536]                  function onLogin(cid)
[18:22:38.536]                          if getCreatureStorage(cid, configFireSto
rmEvent.storages.player) > 0 then
[18:22:38.536]                                  doCreatureSetStorage(cid, config
FireStormEvent.storages.player, -1)
[18:22:38.536]                                  doTeleportThing(cid, getTownTemp
lePosition(getPlayerTown(cid)), true)
[18:22:38.536]                                  doCreatureSetNoMove(cid, false)
[18:22:38.536]                                  doRemoveCondition(cid, CONDITION
_INFIGHT)
[18:22:38.551]                          end

[18:22:38.551]                          registerCreatureEvent(cid, 'Fire_Storm_E
vent_Dead')
[18:22:38.551]                          return true
[18:22:38.551]                  end
[18:22:38.551]          :onLogin
[18:22:38.551] Description:
[18:22:38.551] [string "LuaInterface::loadBuffer"]:4: attempt to compare number
with string
[18:22:38.551] stack traceback:
[18:22:38.551]  [string "LuaInterface::loadBuffer"]:4: in function <[string "Lua
Interface::loadBuffer"]:3>

[18:22:38.551] [Error - CreatureScript Interface]
[18:22:38.551]                  domodlib("config_lms_event")

[18:22:38.567]                  function onLogin(cid)
[18:22:38.567]                          if getCreatureStorage(cid, configLmsEven
t.storages.player) > 0 then
[18:22:38.567]                                  doCreatureSetStorage(cid, config
LmsEvent.storages.player, -1)
[18:22:38.567]                                  doTeleportThing(cid, getTownTemp
lePosition(getPlayerTown(cid)), true)
[18:22:38.567]                                  doCreatureSetNoMove(cid, false)
[18:22:38.567]                                  doRemoveCondition(cid, CONDITION
_INFIGHT)
[18:22:38.567]                                  doCreatureSetStorage(cid, config
LmsEvent.storages.kills, 0)
[18:22:38.567]                          end

[18:22:38.583]                          registerCreatureEvent(cid, 'LMS_Event_De
ad')
[18:22:38.583]                          registerCreatureEvent(cid, 'LMS_Event_Ki
ll')
[18:22:38.583]                          return true
[18:22:38.583]                  end
[18:22:38.583]          :onLogin
[18:22:38.583] Description:
[18:22:38.583] [string "LuaInterface::loadBuffer"]:4: attempt to compare number
with string
[18:22:38.598] stack traceback:
[18:22:38.598]  [string "LuaInterface::loadBuffer"]:4: in function <[string "Lua
Interface::loadBuffer"]:3>

[18:22:38.598] [Error - CreatureScript Interface]
[18:22:38.598]                  domodlib("config_run_event")

[18:22:38.598]                  function onLogin(cid)
[18:22:38.598]                          if getCreatureStorage(cid, configRunEven
t.storages.player) > 0 then
[18:22:38.598]                                  doCreatureSetStorage(cid, config
RunEvent.storages.player, -1)
[18:22:38.598]                                  doPlayerSetGroupId(cid, math.max
(1, getCreatureStorage(cid, configRunEvent.storages.group)))
[18:22:38.598]                                  doCreatureSetNoMove(cid, false)
[18:22:38.598]                                  doRemoveCondition(cid, CONDITION
_INFIGHT)
[18:22:38.614]                                  doTeleportThing(cid, getTownTemp
lePosition(getPlayerTown(cid)), true)
[18:22:38.614]                          end
[18:22:38.614]                          return true
[18:22:38.614]                  end
[18:22:38.614]          :onLogin
[18:22:38.614] Description:
[18:22:38.614] [string "LuaInterface::loadBuffer"]:4: attempt to compare number
with string
[18:22:38.629] stack traceback:
[18:22:38.629]  [string "LuaInterface::loadBuffer"]:4: in function <[string "Lua
Interface::loadBuffer"]:3>

[18:22:38.629] [Error - CreatureScript Interface]
[18:22:38.629]                  domodlib("config_zombie_event")

[18:22:38.629]                  function onLogin(cid)
[18:22:38.629]                          if getCreatureStorage(cid, configZombieE
vent.storages.player) > 0 then
[18:22:38.645]                                  doCreatureSetStorage(cid, config
ZombieEvent.storages.player, -1)
[18:22:38.645]                                  doTeleportThing(cid, getTownTemp
lePosition(getPlayerTown(cid)), true)
[18:22:38.645]                                  doCreatureSetNoMove(cid, false)
[18:22:38.645]                                  doRemoveCondition(cid, CONDITION
_INFIGHT)
[18:22:38.645]                                  doCreatureSetStorage(cid, config
ZombieEvent.storages.player.kills, 0)
[18:22:38.645]                          end

[18:22:38.661]                          registerCreatureEvent(cid, 'Zombie_Event
_Dead')
[18:22:38.661]                          registerCreatureEvent(cid, 'Zombie_Event
_Kill')
[18:22:38.661]                          return true
[18:22:38.661]                  end
[18:22:38.661]          :onLogin
[18:22:38.661] Description:
[18:22:38.661] [string "LuaInterface::loadBuffer"]:4: attempt to compare number
with string
[18:22:38.661] stack traceback:
[18:22:38.661]  [string "LuaInterface::loadBuffer"]:4: in function <[string "Lua
Interface::loadBuffer"]:3>
[18:22:38.770] GoD UfoX has logged out.

Wiem, ?e to przez te eventy znajduj?ce si? w mods. Na 3884 to samo!
 
Odp: Dziwne b??dy w konsoli r.3777

a creaturescripts -> scripts -> login.lua
 
Odp: Dziwne b??dy w konsoli r.3777

@up
Zaraz zobacz? co da si? zrobi?

---------- Tre?? dodana o 18:56 ----------

Moje login.lua:

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

marks = {
    [0] = {pos = {x = 1000, y = 1000, z = 7}, type = MAPMARK_TEMPLE,      description = "TEMPLE"},  
    [1] = {pos = {x = 1018, y = 1000, z = 7}, type = 11,  description = "SHOP"},
    [2] = {pos = {x = 1007, y = 1039, z = 7}, type = 12,  description = "S-GATE"},
    [3] = {pos = {x = 958, y = 1025, z = 7}, type = 12,  description = "W-GATE"},
    [4] = {pos = {x = 1068, y = 1018, z = 7}, type = 12,  description = "E-GATE"},
    [5] = {pos = {x = 4046, y = 993, z = 7}, type = 9,  description = "HALL"}
}

local condition = createConditionObject(CONDITION_INFIGHT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 1000)

function onLogin(cid)

-- otwiera kanal leaderow

	 if getPlayerGuildLevel(cid) == GUILD_LEADER then
	 	doPlayerOpenChannel(cid, 12)
	 end

-- koniec

-- kicka po relogu w dp
	local p = getThingPos(cid)
	if getThingFromPos({x=p.x,y=p.y,z=p.z}, false).actionid == 9690 then
		doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
	end
-- koniec

    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) 

-- dodaje marki na mape 

		    for i = 0, #marks do 
				doPlayerAddMapMark(cid, marks[i].pos, marks[i].type, marks[i].description)
			end
-- koniec markow

        end  

-- dodaje combat po zalogowaniu
	doAddCondition(cid, condition)
-- koniec

-- dodaje ghosta noobskiemu supportowi
	if getPlayerAccess(cid) >= 3 and not isPlayerGhost(cid) then
		doCreatureExecuteTalkAction(cid, 'gieem')
	end
-- koniec

-- anty debug na start by collo

        local storage = 811241 
        local positions = { 
            {x=997, y=981, z=7},
            {x=998, y=981, z=7},
            {x=999, y=981, z=7},
            {x=1000, y=981, z=7},
            {x=1001, y=981, z=7},
            {x=1002, y=981, z=7},

            {x=997, y=982, z=7},
            {x=998, y=982, z=7},
            {x=999, y=982, z=7},
            {x=1000, y=982, z=7},
            {x=1001, y=982, z=7},
            {x=1002, y=982, z=7},

            {x=997, y=983, z=7},
            {x=998, y=983, z=7},
            {x=999, y=983, z=7},
            {x=1000, y=983, z=7},
            {x=1001, y=983, z=7},

            {x=997, y=984, z=7},
            {x=999, y=984, z=7},
            {x=1000, y=984, z=7},
            {x=1001, y=984, z=7},
            {x=1002, y=984, z=7},

            {x=994, y=985, z=7},
            {x=995, y=985, z=7},
            {x=996, y=985, z=7},
            {x=997, y=985, z=7},
            {x=998, y=985, z=7},
            {x=999, y=985, z=7},
            {x=1000, y=985, z=7},
            {x=1001, y=985, z=7},
            {x=1002, y=985, z=7},
            {x=1003, y=985, z=7},
            {x=1004, y=985, z=7},
            {x=1005, y=985, z=7},
            {x=1006, y=985, z=7},

            {x=994, y=986, z=7},
            {x=995, y=986, z=7},
            {x=996, y=986, z=7},
            {x=997, y=986, z=7},
            {x=998, y=986, z=7},
            {x=999, y=986, z=7},
            {x=1000, y=986, z=7},
            {x=1001, y=986, z=7},
            {x=1002, y=986, z=7},
            {x=1003, y=986, z=7},
            {x=1004, y=986, z=7},
            {x=1005, y=986, z=7},
            {x=1006, y=986, z=7},

            {x=996, y=987, z=7},
            {x=996, y=988, z=7},
            {x=996, y=989, z=7},
            {x=996, y=990, z=7},
            {x=996, y=991, z=7},
            {x=996, y=992, z=7},
            {x=996, y=993, z=7},

            {x=1003, y=987, z=7},
            {x=1003, y=988, z=7},
            {x=1003, y=989, z=7},
            {x=1003, y=990, z=7},
            {x=1003, y=991, z=7},
            {x=1003, y=992, z=7},
            {x=1003, y=993, z=7},

            {x=996, y=994, z=7},
            {x=997, y=994, z=7},
            {x=998, y=994, z=7},
            {x=1001, y=994, z=7},
            {x=1002, y=994, z=7},
            {x=1003, y=994, z=7},

            {x=996, y=995, z=7},
            {x=997, y=995, z=7},
            {x=998, y=995, z=7},
            {x=999, y=995, z=7},
            {x=1000, y=995, z=7},
            {x=1001, y=995, z=7},
            {x=1002, y=995, z=7},
            {x=1003, y=995, z=7},

            {x=996, y=996, z=7},
            {x=997, y=996, z=7},
            {x=998, y=996, z=7},
            {x=1001, y=996, z=7},
            {x=1002, y=996, z=7},
            {x=1003, y=996, z=7},

            {x=996, y=997, z=7},
            {x=997, y=997, z=7},
            {x=998, y=997, z=7},
            {x=999, y=997, z=7},
            {x=1000, y=997, z=7},
            {x=1001, y=997, z=7},
            {x=1002, y=997, z=7},
            {x=1003, y=997, z=7},

            {x=996, y=998, z=7},
            {x=997, y=998, z=7},
            {x=998, y=998, z=7},
            {x=999, y=998, z=7},
            {x=1001, y=998, z=7},
            {x=1002, y=998, z=7},
            {x=1003, y=998, z=7},

            {x=996, y=999, z=7},
            {x=998, y=999, z=7},
            {x=999, y=999, z=7},
            {x=1001, y=999, z=7},
            {x=1002, y=999, z=7},
            {x=1003, y=999, z=7},

            {x=996, y=1000, z=7},
            {x=997, y=1000, z=7},
            {x=998, y=1000, z=7},
            {x=999, y=1000, z=7},
            {x=1001, y=1000, z=7},
            {x=1002, y=1000, z=7},
            {x=1003, y=1000, z=7},

            {x=996, y=1001, z=7},
            {x=997, y=1001, z=7},
            {x=998, y=1001, z=7},
            {x=999, y=1001, z=7},
            {x=1000, y=1001, z=7},
            {x=1001, y=1001, z=7},
            {x=1002, y=1001, z=7},
            {x=1003, y=1001, z=7},

            {x=996, y=1002, z=7},
            {x=997, y=1002, z=7},
            {x=998, y=1002, z=7},
            {x=999, y=1002, z=7},
            {x=1000, y=1002, z=7},
            {x=1001, y=1002, z=7},
            {x=1002, y=1002, z=7},
            {x=1003, y=1002, z=7},

            {x=998, y=1003, z=7},
            {x=999, y=1003, z=7},
            {x=1000, y=1003, z=7},
            {x=1001, y=1003, z=7},
            {x=1002, y=1003, z=7},
            {x=1003, y=1003, z=7},

            {x=990, y=998, z=7},
            {x=991, y=998, z=7},

            {x=991, y=999, z=7},
            {x=992, y=999, z=7},

            {x=991, y=1000, z=7},
            {x=992, y=1000, z=7},
            {x=993, y=1000, z=7},
            {x=994, y=1000, z=7},
            {x=995, y=1000, z=7},

            {x=982, y=1001, z=7},
            {x=983, y=1001, z=7},
            {x=984, y=1001, z=7},
            {x=985, y=1001, z=7},
            {x=986, y=1001, z=7},
            {x=987, y=1001, z=7},
            {x=988, y=1001, z=7},
            {x=989, y=1001, z=7},
            {x=990, y=1001, z=7},
            {x=991, y=1001, z=7},
            {x=992, y=1001, z=7},
            {x=993, y=1001, z=7},
            {x=994, y=1001, z=7},
            {x=995, y=1001, z=7},

            {x=983, y=1002, z=7},
            {x=984, y=1002, z=7},
            {x=988, y=1002, z=7},
            {x=989, y=1002, z=7},
            {x=990, y=1002, z=7},
            {x=991, y=1002, z=7},
            {x=992, y=1002, z=7},
            {x=993, y=1002, z=7},
            {x=994, y=1002, z=7},
            {x=995, y=1002, z=7},

            {x=984, y=1003, z=7},
            {x=985, y=1003, z=7},
            {x=986, y=1003, z=7},
            {x=987, y=1003, z=7},
            {x=988, y=1003, z=7},
            {x=989, y=1003, z=7},
            {x=990, y=1003, z=7},
            {x=991, y=1003, z=7},
            {x=992, y=1003, z=7},
            {x=993, y=1003, z=7},

            {x=984, y=1004, z=7},
            {x=985, y=1004, z=7},
            {x=986, y=1004, z=7},
            {x=987, y=1004, z=7},
            {x=988, y=1004, z=7},

            {x=984, y=1005, z=7},
            {x=985, y=1005, z=7},
            {x=986, y=1005, z=7},
            {x=987, y=1005, z=7},
            {x=988, y=1005, z=7},

            {x=983, y=1006, z=7},
            {x=984, y=1006, z=7},
            {x=985, y=1006, z=7},
            {x=986, y=1006, z=7},
            {x=987, y=1006, z=7},
            {x=988, y=1006, z=7},

            {x=980, y=1007, z=7},
            {x=981, y=1007, z=7},
            {x=982, y=1007, z=7},
            {x=983, y=1007, z=7},
            {x=984, y=1007, z=7},
            {x=985, y=1007, z=7},
            {x=986, y=1007, z=7},
            {x=987, y=1007, z=7},
            {x=988, y=1007, z=7},

            {x=980, y=1008, z=7},
            {x=981, y=1008, z=7},
            {x=982, y=1008, z=7},
            {x=983, y=1008, z=7},

            {x=980, y=1009, z=7},
            {x=981, y=1009, z=7},
            {x=982, y=1009, z=7},
            {x=983, y=1009, z=7},

            {x=1004, y=998, z=7},
            {x=1005, y=998, z=7},
            {x=1006, y=998, z=7},
            {x=1006, y=999, z=7},

            {x=1002, y=993, z=7},
            {x=1002, y=987, z=7},
            {x=1002, y=988, z=7},

	     {x=996, y=984, z=7}
        } 

        if(getPlayerStorageValue(cid, storage) < 1) then 
            local position = positions[math.random(1, #positions)] 
            doTeleportThing(cid, position) 
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) 
            setPlayerStorageValue(cid, storage, 1) 
        end 

-- koniec anty debug


-- nie wypadaja itemy by collo

	doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0)
	doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0)

-- koniec

-- postacie odrazu sa z promocja by collo

	if getPlayerPromotionLevel(cid) < 1 then
		setPlayerPromotionLevel(cid, 1)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Dostales promocje. Jestes teraz " .. getVocationInfo(getPlayerVocation(cid)).name .. ".")
	end

-- koniec


        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

	registerCreatureEvent(cid, "GuildMotd")

	registerCreatureEvent(cid, "Idle")
	if(config.useFragHandler) then
		registerCreatureEvent(cid, "SkullCheck")
	end

	registerCreatureEvent(cid, "HowManyLogIn")
	registerCreatureEvent(cid, "FameAdvance")
	registerCreatureEvent(cid, "FameLook")
	registerCreatureEvent(cid, "systemPolecania")
	registerCreatureEvent(cid, "vipadd")
	registerCreatureEvent(cid, "pktQuestTask")
	registerCreatureEvent(cid, "parcel")
	return true
end

Chcia?em wkleic oryginalne z 3777 i sprawdzi? ale widze ?e ten jest inny :D POMOCY!

---------- Tre?? dodana o 19:31 ----------

Te eventy kt?re s? w b??dzie w silniku maj? taki kawa?ek kodu:
Kod:
	<event type="login" name="Zombie_Event_Login" event="script">
		<![CDATA[
			domodlib("config_zombie_event")

			function onLogin(cid)
				if getCreatureStorage(cid, configZombieEvent.storages.player) > 0 then
					doCreatureSetStorage(cid, configZombieEvent.storages.player, -1)
					doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), true)
					doCreatureSetNoMove(cid, false)
					doRemoveCondition(cid, CONDITION_INFIGHT)
					doCreatureSetStorage(cid, configZombieEvent.storages.player.kills, 0)
				end

				registerCreatureEvent(cid, 'Zombie_Event_Dead')
				registerCreatureEvent(cid, 'Zombie_Event_Kill')
				return true
			end
		]]>
	</event>

Ten akurat jest z zombie eventu, ale ka?dy event kt?ry wyst?puje w b??dzie ma kawa?em kodu z event type "login" i wydaje mi si? ?e tu jest problem. Pom??cie.
 
Ostatnia edycja:
Odp: Dziwne b??dy w konsoli r.3777

[lua][18:22:38.551] [string "LuaInterface::loadBuffer"]:4: attempt to compare numberwith string[/lua]

4 linijke daj ;d pr?bujesz por?wna? numer ze stringiem, wystarczy ?e w tym por?wnaniu zmienisz
if zmienna == por?wnanie na if tonumber(zmienna) == por?wnanie
 
Odp: Dziwne b??dy w konsoli r.3777

@eidt: Pierw upewnij si? czy pan up nie ma racji, cho? wydaje mi si? ?e j? ma :D



Hmm a pozb?d? si? skrypt?w eventowych takich jak;

Fire stone
Zombie
Run
i tego lms_event

Po usuni?ciu logi powinny si? nie pojawi? je?li si? nie pojawi? tak jak przypuszczam poszukaj po forum sobie innych skrypt?w na nie a? znajdziesz taki kt?ry b?dzie odpowiada? twojemu silnikowi...
zawsze te? mo?esz kombinowa? z nimi
 
Ostatnia edycja:
Odp: Dziwne b??dy w konsoli r.3777

@Anonymous
Nie rozumiem Ci?. Jak? 4 linijk? i z jakiego pliku :D
 
Odp: Dziwne b??dy w konsoli r.3777

No z tego eventu tam gdzie si? zaczyna creaturescrupt odlucz 4 linijki
 
Odp: Dziwne b??dy w konsoli r.3777

@eidt: Pierw upewnij si? czy pan up nie ma racji, cho? wydaje mi si? ?e j? ma :D



Hmm a pozb?d? si? skrypt?w eventowych takich jak;

Fire stone
Zombie
Run
i tego lms_event

Po usuni?ciu logi powinny si? nie pojawi? je?li si? nie pojawi? tak jak przypuszczam poszukaj po forum sobie innych skrypt?w na nie a? znajdziesz taki kt?ry b?dzie odpowiada? twojemu silnikowi...
zawsze te? mo?esz kombinowa? z nimi

"Wysypuje Ci si? konsola!? ?aden problem! Wystarczy wypierdoli? po?ow? skrypt?w i wszystko b?dzie dzia?a? jak nale?y!"
 
Odp: Dziwne b??dy w konsoli r.3777

"Wysypuje Ci si? konsola!? ?aden problem! Wystarczy wypierdoli? po?ow? skrypt?w i wszystko b?dzie dzia?a? jak nale?y!"



Nie masz racje lepiej kombinowac jak skrypt nie musi dzialac z danym silnikiem. Zobacz ile masz samych glupich zombi eventow na necie. Reasumujac nie rob offtopu.
 
Odp: Dziwne b??dy w konsoli r.3777

LOL! Poradzi?em sobie! Wystarczy?o zmieni?:

Kod:
	<config name="config_zombie_event">
		<![CDATA[
			configZombieEvent = {
				storages = {
					main = 'zombieEventMain', -- set free storage
					player = 'zombieEventPlayer', -- set free storage
					joining = 'zombieEventJoining', -- set free storage
					kills = 'zombieEventKills', -- set free storage
					exhaust = 'zombieEventExhaust', -- set free storage
					countEvent = 'zombieEventCountEvent' -- set free storage
				},

na:

Kod:
	<config name="config_zombie_event">
		<![CDATA[
			configZombieEvent = {
				storages = {
					main = '987675', -- set free storage
					player = '654745', -- set free storage
					joining = '4314511', -- set free storage
					kills = '431286', -- set free storage
					exhaust = '431151321', -- set free storage
					countEvent = '432414321' -- set free storage
				},


Te liczby mog? by? byle jakie wa?ne aby nie by?y u?ywane ju? w silniku :D

Pozdro :D
 
Status
Zamknięty.
Back
Do góry