View Full Version : When my character stay X say X
Elizabeth
07-12-2016, 01:11 AM
Hey Friends! :)
I need one script, when my chracter stay 30 sec my character say 'Exori' but only if NO PLAYER ON SCREEN.
Elizabeth
07-13-2016, 09:47 PM
Someone help me? :(
Trykon
07-13-2016, 10:20 PM
functions with timer are quite difficult... but lets try
while true do
local posx = Self.Psoition().x
local posy = Self.Position().y
local posz = Self.Position().z
local counter = 0
while (posx == Self.Psoition().x and posy == Self.Position().y and posz == Self.Position().z) do
counter = counter + 1
if counter > 30 then
Self.Say("Exori")
end
wait(1000)
end
end
should do
Elizabeth
07-15-2016, 02:39 PM
functions with timer are quite difficult... but lets try
while true do
local posx = Self.Psoition().x
local posy = Self.Position().y
local posz = Self.Position().z
local counter = 0
while (posx == Self.Psoition().x and posy == Self.Position().y and posz == Self.Position().z) do
counter = counter + 1
if counter > 30 then
Self.Say("Exori")
end
wait(1000)
end
end
should do
XenoScript Error:
Script: AAAAA.lua
Line #: 2
Chunk: ...sers?Eliza?DOCUME?1?XenoBot?Scripts??AAAAAA?2.L UA
Error: attempt to call field 'Psoition' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.
Tirell
07-15-2016, 04:15 PM
while true do
local posx = Self.Position().x
local posy = Self.Position().y
local posz = Self.Position().z
local counter = 0
while (posx == Self.Position().x and posy == Self.Position().y and posz == Self.Position().z) do
counter = counter + 1
if counter > 30 then
Self.Say("Exori")
end
wait(1000)
end
end
Trykon
07-15-2016, 07:38 PM
Hahaha just letter error, psoition insteda position
Elizabeth
07-20-2016, 10:11 PM
Hahaha just letter error, psoition insteda position
while true do
local posx = Self.Position().x
local posy = Self.Position().y
local posz = Self.Position().z
local counter = 0
while (posx == Self.Position().x and posy == Self.Position().y and posz == Self.Position().z) do
counter = counter + 1
if counter > 30 then
Self.Say("Exori")
end
wait(1000)
end
end
Ok, i was testing script, and see good, thanks ;)
But this is possible add option, that script work only if on screen is 1 or more monsters?
Zingron
07-20-2016, 11:36 PM
while (true) do
local posx = Self.Position().x
local posy = Self.Position().y
local posz = Self.Position().z
local counter = 0
for _, c in Creature.iMonsters() do
if c:isAlive() and c:isOnScreen() then
while (posx == Self.Position().x and posy == Self.Position().y and posz == Self.Position().z) do
counter = counter + 1
if counter > 30 then
if Self.isAreaPvPSafe(7, false) == true then
Self.Say("exori")
break
end
break
end
wait(1000)
end
end
end
end
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.