House look otPokemon

Marshmello
em Tutoriais de Scripting

Marshmello

Alone ~ [✖‿✖]
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 21/04/16Posts: 831Gênero: Masculino

Fala galera , faz tempo que não venho aqui

 

  estou postando pq vi uns frango vendendo o código idêntico ao meu

 

Antes de começar já aviso que e necessário ter opcodes instalados na source do server

 

Vamos la

 

Em Creaturescript crie um arquivo chamado lookhouse.lua e cole isso lá

function stringValue(preco)

	if preco < 100 then
	 return tostring(preco)
	 
	 else
	 return tostring(string.format("%1.01f", value/100))
	 end
	return 'none'
end



function onLook(cid, thing, position, lookDistance)


if not isCreature(thing.uid) then
local house = getHouseFromPos(position)
if house then

local str = "Casa: "..getHouseName(house)..".\n"
if getHouseOwner(house) ~= 0 then
str = str.."Propietário: "..getPlayerNameByGUID( getHouseOwner(house) ).."\nPreço: "..getHousePrice(house).." dólares"
else
str = str.."Propietário: Não tem\nPreço: "..getHousePrice(house).." dólares"
end

if thing.itemid == 1252 or thing.itemid == 1249 or thing.itemid == 1251 or thing.itemid == 1254 or thing.itemid == 1250 or thing.itemid == 1212 or thing.itemid == 1214 or thing.itemid == 6891 or thing.itemid == 6893 or
thing.itemid == 6900 or thing.itemid == 6902 or thing.itemid == 6892 or  thing.itemid == 1213 or thing.itemid == 1219 or thing.itemid == 1220 or thing.itemid == 1222 or thing.itemid == 1221 or thing.itemid == 5515 or thing.itemid == 5516 or thing.itemid == 5517 or
thing.itemid == 5518 or thing.itemid == 5119 or thing.itemid == 5120 or thing.itemid == 5128 or thing.itemid == 5129 or thing.itemid == 5098 or thing.itemid == 5100 or thing.itemid == 5107 or thing.itemid ==  5109 then

if getHouseOwner(house) ~= 0 then
doSendPlayerExtendedOpcode(cid, 78, getHouseName(house).."@"..getPlayerNameByGUID( getHouseOwner(house) ).."@"..getHousePrice(house).."@"..getHouseInfo(house).beds/2)
else
doSendPlayerExtendedOpcode(cid, 78, getHouseName(house).."@Não a Propietário@"..stringValue(getHousePrice(house)).."@"..getHouseInfo(house).beds/2)
end




end
return false
end
end
return true
end

 

em login.lua registre o evento 

registerCreatureEvent(cid, "LookHouse")

em creaturescript.xml coloque a tag

	<event type="look" name="Lookhouse" event="script" value="lookhouse.lua"/>

 

Modules do OTC

game_house.rar
11.17 KB81 downloads

Não esqueça de registrar o modulo no interface.otmod

- game_house

 E isso bom proveito 

 

Créditos a mim por te feito o código e o modulo

 

 

Como vai ficar

Spoiler

768279868_unknown(1).png.7017ad9ff44207719bddf8a34d22f7b2.png

 

placa1.png.90a184502351cebe72cd7b69751e551d.png

Meu Facebook

INFOS:

Citar

CIDADE: Rio de janeiro

Idade: 22 anos
SOU: {"Scripter(lua)", "WebMaster", "ProgramadorC++"}
 

local config = {
	delrey = getPlayerCarValue(cid, DELREY),
	cigarro = getPlayerCancer(cid, DERBY),
	prostituta = getPlayerAIDS(cid, cracuda),
	tresOitao = getPlayerRevorvi(cid, 38)
}
if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS")
end

 

 

 

Hirxzsxop

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 16/03/22Posts: 40Gênero: MasculinoChar no Tibia: Hirxzsx

Extraordinario MarshMello, comunidade agradece e muito.

Barbie Favela

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 02/05/20Posts: 1

Poderia me add no Discord?

Gostaria de remunerar você por alguns trabalhos. GhostTMZ#5113

gusangtv

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 13/01/23Posts: 4

Fiz tudo certo, minha base tem opcodes não tem nenhum erro na distro e ao dar look na house continua normal

rafersiq

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 18/03/19Posts: 389Gênero: MasculinoChar no Tibia: Rafersiq
Em 12/01/2023 em 22:44, gusangtv disse:

Fiz tudo certo, minha base tem opcodes não tem nenhum erro na distro e ao dar look na house continua normal

da algum erro no terminal do client?

se der manda aki 

--- My Discord ---

 

https://discord.gg/cP9RhJYHCc

 

--- about me ---

 

OtAdimin

Maper
front-end