What's new

Skrypty & Kody 8.1 - Kilka skrypt?w (XML)

Status
Not open for further replies.

lajtowy123

Active User
Joined
Nov 18, 2011
Messages
65
Reaction score
1
Witam,

Polece odrazu prosto z mostu,

Potrzebuj? kilka skrypt?w a mniej wiecej,

* Exp ticket
* Po zabiciu osoby, wypada (za kazdym razem w srodku w ciele Exp ticekt) [odrazu mowie ze w silniku niemam Creaturescripts oraz Globalevents
* Kratka dla access powyzej 1 (dla tutor?w i reszty ekipy)
* Kratka na kt?r? wejdziesz i stworzy potwory na kratkach ktorych wybiore
* NPC kt?ry wymieni 100 EXP Ticket?w na do?wiadczenie
* Gdy GM Zaloguje wyswietla sie wiadomosc (na czerwono)
* Po wpisaniu komendy !support wyswietla sie lista osob z Access 1 +
* Komenda /message (dla GoD?w) po wpisaniu /message "Tekst wyswietla si? w oienku jako tutorial (Message of the day) ale w grze. a widzia?em to w 1 silniku ale nie jako Talkactions tylko w trunkach.
* Po zabiciu osoby pisze (w chacie jako normalna osoba na ???to) I killed (nazwa gracza/potwora)

----
Je?eli kto? potrafi zrobi? taki skrypt to prosz? bardzo, je?eli nie to niech kto? mnie uswiadomi ?e tego i tego skrypty niema i nie bedzie ;/

;)

Pozdrawiam,
Lajtowy.
 

zygzagZ

Advanced User
Joined
Aug 14, 2008
Messages
281
Reaction score
34
Odp: 8.1 - Kilka skrypt?w (XML)

Wi?c tak:
1. Co ma robi? ten Exp Ticket?
2. Tylko w source skoro nie masz creaturescripts
3. W movements:
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if(getTileInfo(position).creatures <= 1) then
		return true
	end
	if getPlayerAccess(cid) < 1 then
	    if(fromPosition.x == 0) then -- player just logged in
     		fromPosition = getTownTemplePosition(getPlayerTown(cid))
       		doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
       	end 
       	doTeleportThing(cid, fromPosition, true)
	end
	return true
end
4. Movements:
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    doCreateMonster("Nazwa Potworka", {x=POZYCJAX, y=POZYCJAY, z=POZYCJAZ}) -- jak chcesz, ?eby si? robi?o wi?cej potwor?w, dokopiuj linijki, lub usu?, ?eby mniej
    doCreateMonster("Nazwa Potworka", {x=POZYCJAX, y=POZYCJAY, z=POZYCJAZ})
    doCreateMonster("Nazwa Potworka", {x=POZYCJAX, y=POZYCJAY, z=POZYCJAZ})
	return true
end
5. Da si? jednak nie chce mi si? tego robi?.
6. Creaturescripts -> source.
7. Talkactions:
Code:
function onSay(cid, words, param, channel)
	local players = getPlayersOnline()
	local strings = {""}

	local i, position = 1, 1
	local added = false
	for _, pid in ipairs(players) do
		if(added) then
			if(i > (position * 7)) then
				strings[position] = strings[position] .. ","
				position = position + 1
				strings[position] = ""
			elseif(not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid)) and (getPlayerAccess(pid) > 0) then
				strings[position] = i == 1 and "" or strings[position] .. ", "
			end
		end

		if(not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid)) and (getPlayerAccess(pid) > 0) then
			strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]"
			i = i + 1
			added = true
		else
			added = false
		end
    end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " tutors(s) online:")
	for i, str in ipairs(strings) do
		if(str:sub(str:len()) ~= ",") then
			str = str .. "."
		end

		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str)
	end

	return true
end
8. Talkactions:
Code:
function onSay(cid, words, param, channel)
	if(param == '') then
		return true
	end
	for i, tid in ipairs(getPlayersOnline()) do
		doPlayerPopupFYI(cid, param)
	end
	return true
end
9. Creaturescripts -> source
 
Last edited:
Status
Not open for further replies.
Top