What's new

Skrypty & Kody Transform system bledy

Status
Not open for further replies.

lordmarian

Advanced User
Joined
May 26, 2009
Messages
366
Reaction score
19
Witam mam problem po uzyciu transformacji wylogowaniu i zalogowaniu si? sie r??ne rzeczy jestem "magicefectem", zmienia mi sie outfit nie wiem czemu tak sie dzi?je.
Oto kawa?ek skryptu z function.lua

PHP:
TransformSys.loadOutfit = function (cid)
    local outfit = {lookAddons = 0, lookType = 0, lookHead = 0, lookTypeEx = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}
    outfit.lookType = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 1) -- I know its ugly but really there is no other good way to load outfit xd
	if(outfit.lookType == -1) then -- jesli gracz nie ma zapisanego outfitu
		return Transform_config.defaultOutfit -- ustawia outfit na standardowy
	end
    outfit.lookTypeEx = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 3)
    outfit.lookHead = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 2)
    outfit.lookBody = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 5)
    outfit.lookLegs = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 4)
    outfit.lookFeet = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 6)
    outfit.lookAddons = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit)
    return outfit
end

Gdy usun? t? cz??? to po zalogowaniu mam wyglad taki jaki mialem ostatni i nie ma ?adnych b??d?w. Jedynie czego potrzebuje to ?eby t? cze?? zamieni? na skrpyt kt?ry bd ustawial mi po zalogowaniu looktype jaki sobie wybiore dla danej voc.
PHP:
    outfit.lookTypeEx = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 3)
    outfit.lookHead = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 2)
    outfit.lookBody = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 5)
    outfit.lookLegs = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 4)
    outfit.lookFeet = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit + 6)
    outfit.lookAddons = getPlayerStorageValue(cid, Transform_config.storageSaveOutfit)
 

Restles

Senior User
Joined
Aug 31, 2012
Messages
616
Reaction score
51
Odp: Transform system bledy

creaturescripts
[LUA]function onLogin(cid)
wokacje = {
[0] = {lookType = {lookType=1}},
[1] = {lookType = {lookType=2}}
}

local wokacja = wokacje[getPlayerVocation(cid)]
if (not wokacja) then
else
doSetCreatureOutfit(cid, wokacja.lookType, -1)
return true
end
end[/LUA]
 

lordmarian

Advanced User
Joined
May 26, 2009
Messages
366
Reaction score
19
Odp: Transform system bledy

Okej dzieki reput leci
 
Last edited:
Status
Not open for further replies.
Top