Syiko
Scripter/Developer
- Joined
- Aug 28, 2017
- Messages
- 474
- Solutions
- 3
- Reaction score
- 108
Adversario after working with him.. this Was the result I think It is because of carcoo that he write that report .. Because he wasn't in his contact.. before.
Now he telling that I made him converts for tfs 1.x to 1.5 to get more time instead of installing OTservBR which will take 2 days as he telling us ..!
Before I am working or even write 1 code ..
I told him that otservbr is a shitty code and none develop in it well and developers hate to work with it alot but if he need to install it will take only 10 mins .. as will be in photos from the converstion now .. then I told him that Tfs will spend 1000 hours. of work or more .. and it will cost him above 1000-1500 or less depend on time and the work I will do .. I was converting old tfs 1.x to 1.5 (1.4.1) LASTEST for 10.98 which can be convert easily to tfs 1.5 12.85 only otb need to be compiled with 12.85 they are the same source and the source modified if he want to upgrade to 12.85 and it's easy because they are the same code.. And he choose that he want to work with TFS as it will be clear and able to updates for far. not a bull of shit like otservbr ... as shown in images ... here..
For @Shadow_ I wasn't know that he is the Egyptain CArcoo .. IK after my comment in the Post because I answered from the phone .. anyway he is saying that my code isn't work and bugged code well. for His chasing after my clients and My reputation I will post His code here..
For People to test and read and rate the code .. first he need a system that will respawn the monster in a room this monster will have a chance x to get no damage for x time . until the people make a requested task suchs as using levers / tiles / turns in special directions .. before the time is end if time end and the monster is hardcore all people will be dead if it's not hardcore only the player who didn't made the task he will dead..
I add to the script that the script will create the room automatic and remove the room after the players dead / monster dead.. to Join the room you have to be in party and party leader only who can go in .. between party members mustn't be pz because if they are far away or in war .. they can join but they haven't to be pk.
Unfortunalety I can't upload the converstion between me and carcoo as it in arabic and it's illegal to use any other language here..
Mistakes that Carcoo made .. :
First he modified the code I sent him he doesn't test it as I send .,.
Second he was trying to get any error in my code ..
Third he tested the code after I gave him by a month
Fourth when he msg me to fix the code I asked for team viewer and fixed the mistakes and moifications he did but it's not my mind to do it. as it not my mine code..
fifth He made a comment without backing to me and waiting for my answer to help him to modify the code or not all my clients They know I make a good support along time even the code get error or nil value as we know there are small missing conditions that can't show up without testing the script by many people and it's a special cases ..
Global.lua
Scripts folder bosslever.lua
Boss modal.lua
global events :
EVents / player >> function player on turn
Now he telling that I made him converts for tfs 1.x to 1.5 to get more time instead of installing OTservBR which will take 2 days as he telling us ..!
Before I am working or even write 1 code ..
I told him that otservbr is a shitty code and none develop in it well and developers hate to work with it alot but if he need to install it will take only 10 mins .. as will be in photos from the converstion now .. then I told him that Tfs will spend 1000 hours. of work or more .. and it will cost him above 1000-1500 or less depend on time and the work I will do .. I was converting old tfs 1.x to 1.5 (1.4.1) LASTEST for 10.98 which can be convert easily to tfs 1.5 12.85 only otb need to be compiled with 12.85 they are the same source and the source modified if he want to upgrade to 12.85 and it's easy because they are the same code.. And he choose that he want to work with TFS as it will be clear and able to updates for far. not a bull of shit like otservbr ... as shown in images ... here..
AdversarioV
For @Shadow_ I wasn't know that he is the Egyptain CArcoo .. IK after my comment in the Post because I answered from the phone .. anyway he is saying that my code isn't work and bugged code well. for His chasing after my clients and My reputation I will post His code here..
For People to test and read and rate the code .. first he need a system that will respawn the monster in a room this monster will have a chance x to get no damage for x time . until the people make a requested task suchs as using levers / tiles / turns in special directions .. before the time is end if time end and the monster is hardcore all people will be dead if it's not hardcore only the player who didn't made the task he will dead..
I add to the script that the script will create the room automatic and remove the room after the players dead / monster dead.. to Join the room you have to be in party and party leader only who can go in .. between party members mustn't be pz because if they are far away or in war .. they can join but they haven't to be pk.
Unfortunalety I can't upload the converstion between me and carcoo as it in arabic and it's illegal to use any other language here..
Mistakes that Carcoo made .. :
First he modified the code I sent him he doesn't test it as I send .,.
Second he was trying to get any error in my code ..
Third he tested the code after I gave him by a month
Fourth when he msg me to fix the code I asked for team viewer and fixed the mistakes and moifications he did but it's not my mind to do it. as it not my mine code..
fifth He made a comment without backing to me and waiting for my answer to help him to modify the code or not all my clients They know I make a good support along time even the code get error or nil value as we know there are small missing conditions that can't show up without testing the script by many people and it's a special cases ..
Global.lua
Lua:
----------------------------------------------------------------------------------------
---------------ROOMING BOSSES----------------
roomIndex = {}
monsterRunning ={}
RoomRunning={}
RoomP={}
TurnRunning={}
--bosstype = {"roomtype",Times to execute.. , time }
bosstype = {{"turn",(math.random(5,10)),45} ,{"stepin",(math.random(5,10)),45},{"lever",(math.random(5,8)),45}}
function CreatebossStyle(style,index,pos,roomid)
pp = {}
for i = 1 ,index do
table.insert(pp, {x=pos.x+math.random(-13,13),y=pos.y+math.random(-13,13),z=pos.z})
end
RoomP[roomid] = pp
if style == "lever" then
for i =1 , index do
local item = Game.createItem(1945,1,pp[i])
item:setAttribute("aid",8770+i)
end
else
for i =1 , index do
local item = Game.createItem(11062,1,pp[i])
item:setAttribute("aid",8770+i)
end
end
return true
end
configBoss =
{
bosses= {
-- don't forget to add them at bossmodal with the same ids order.
--bossid={"rat","demon"}
["rat"]={chance=2000,hardcore="no",id=1},
["Demon"]={chance=2000,hardcore="yes",id=2},
},
room =
{
teleport = 1387,
ground = 406,
nortWestCorner = 1113,
southEastCorner = 1115,
wallFaceNorth = 1116,
wallFaceEast = 1114,
fire = 1484,
},
temple = {x = 14966, y = 14965, z = 6}, -- the position the player will get teleported to if he leaves the room
startPos = {x = 15000, y = 15000, z = 6}, -- the top north west position from where we start to create the rooms from.
offset = 60, -- this is the space between each masterPos of the room (can't be lower then 5!)
gridX = 10, -- how much rooms we create on one x axis
gridY = 10, -- how much rooms we create on one y axis
gridZ = 5 -- how much layers we use therefor
-- this basicly means we can create in the grid example: 10*10*5 = 500 room in this case.
}
function createRoom(pos,Monster,hardid)
local index= getRoomIndexFromPos(pos)
local realPos = {x = pos.x - 15, y = pos.y - 15, z = pos.z}
for a = 0,29 do -- here we create the ground
for b = 0,29 do
doCreateItem(configBoss.room.ground, 1, {x = realPos.x + a, y = realPos.y + b, z = realPos.z})
end
end
ITEM = Game.createItem (415, 1, pos)
ITEM:setAttribute("aid", 8772)
Game.createItem(configBoss.room.nortWestCorner, 1, realPos) -- we create the north west corner wall
Game.createItem(configBoss.room.southEastCorner, 1, {x = realPos.x + 29, y = realPos.y + 29, z = realPos.z}) -- we create the south east corner wall
for a = 1,29 do -- we create the left wall side which faces north
Game.createItem(configBoss.room.wallFaceNorth, 1, {x = realPos.x, y = realPos.y + a, z = realPos.z})
end
for a = 1,28 do -- we create the right wall side which faces north
Game.createItem(configBoss.room.wallFaceNorth, 1, {x = realPos.x + 29, y = realPos.y + a, z = realPos.z})
end
for a = 1,29 do -- we create the north wall side which faces east
Game.createItem(configBoss.room.wallFaceEast, 1, {x = realPos.x + a, y = realPos.y, z = realPos.z})
end
for a = 1,28 do -- we create the south wall side which faces east
Game.createItem(configBoss.room.wallFaceEast, 1, {x = realPos.x + a, y = realPos.y + 29, z = realPos.z})
end
addEvent(1000, createBossRoom(Monster,realPos))
--teleport = Game.createItem(configBoss.room.teleport, 1, {x = realPos.x + 1, y = realPos.y + 1, z = realPos.z})
--teleport:setAttribute("aid", 8771)-- here we create the teleport to leave the room
local hard = {100,150,300,500,999}
end
function createBossRoom(Monster,realPos)
Boss = Game.createMonster(Monster, {x = realPos.x + 15, y = realPos.y + 1, z = realPos.z}) -- here we create the monsters
--boss:setlevel() // you have it in your source.
Boss:registerEvent(Bosschange)
--print(Boss:getId():registerEvent(Bosschange))
end
function deleteRoom(pos)
local Centerpos = pos
for x = Centerpos.x-15, Centerpos.x+15 do
for y = Centerpos.y-15, Centerpos.y+15 do
for z = Centerpos.z, Centerpos.z do
local pos = {x=x, y=y, z=z, stackpos = 253}
local thing = getThingfromPos(pos)
if thing.itemid > 0 then
doRemoveCreature(thing.uid)
end
local pos = {x=x, y=y, z=z, stackpos = 1}
local thing = getThingfromPos(pos)
if thing.itemid > 0 then
doRemoveItem(thing.uid)
end
local pos = {x=x, y=y, z=z}
local thing = getThingfromPos(pos)
if thing.itemid > 0 then
doRemoveItem(thing.uid)
end
end
end
end
return true
end
function getNextRoom()
if roomIndex[1] ~= nil then
for a = 1, #roomIndex do
if roomIndex[a] == false then
return a
elseif #roomIndex == a then
roomIndex[#roomIndex + 1] = false
return #roomIndex
end
end
else
return 1
end
end
function getRoomPosFromIndex(id)
local indicator = {x = 0, y = 0, z = 0}
if id > configBoss.gridX * configBoss.gridY then
repeat
id = id - configBoss.gridX * configBoss.gridY
indicator.z = indicator.z + 1
until id <= configBoss.gridX * configBoss.gridY
end
if id > configBoss.gridX then
repeat
id = id - configBoss.gridY
indicator.y = indicator.y + 1
until id <= configBoss.gridY
end
indicator.x = id
local offset = {x = indicator.x * configBoss.offset, y = indicator.y * configBoss.offset, z = indicator.z}
return {x = configBoss.startPos.x + offset.x, y = configBoss.startPos.y + offset.y, z = configBoss.startPos.z + offset.z}
end
function getRoomIndexFromPos(pos)
local x = (pos.x - configBoss.startPos.x) / configBoss.offset
local y = (pos.y - configBoss.startPos.y) / configBoss.offset * configBoss.gridY
local z = (pos.z - configBoss.startPos.z) * (configBoss.gridX * configBoss.gridY)
return (x + y + z)
end
function setRoomInUse(id)
roomIndex[id] = true
end
function setRoomUnused(id)
roomIndex[id] = false
end
Code:
local bosslever = Action()
function bosslever.onUse(player, item, fromPosition, target, toPosition, isHotkey)
print(RoomRunning[player:getStorageValue(8770)][3])
local scored = ( player:getStorageValue(8771)-8770 +1)
local tot = (RoomRunning[player:getStorageValue(8770)][2] )
local mins = (((RoomRunning[player:getStorageValue(8770)][3]) - os.time())%3600) / 60
local secs = (((RoomRunning[player:getStorageValue(8770)][3]) - os.time())%3600) % 60
local secss
local minss
if (math.floor(mins) < 10) then
minss = "0".. math.floor(mins)
else
minss = math.floor(mins)
end
if (math.floor(secs) < 10) then
secss = "0".. math.floor(secs)
else
secss = math.floor(secs)
end
if (item:getActionId() - player:getStorageValue(8771)) == 1 then
player:setStorageValue(8771,player:getStorageValue(8771)+1)
player:getPosition():sendMagicEffect(7)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "you have clicked "..scored.." / "..tot.." lever.Left Time: "..minss.." minutes:"..secss.." seconds")
else
player:getPosition():sendMagicEffect(CONST_ME_SOUND_YELLOW)
end
return true
end
for i = 8771, 8790 do
bosslever:aid(i)
end
bosslever:register()
Code:
local Bossmodal = MoveEvent()
Bossmodal:type("stepin")
local window = ModalWindow {
title = 'Title',
message = 'Please, choose the lowest number and press [Ok]'
}
function Bossmodal.onStepIn(player, item, position, fromPosition)
player:registerEvent("BossRoom_window")
local title = "Bosses Room"
local message = "Hello"
local window = ModalWindow(1800, title, message)
window:addButton(100, "Choose")
window:addButton(101, "Cancel")
for i, value in pairs(configBoss.bosses) do
if (value.hardcore=="yes") then
window:addChoice(value.id,""..i.."[Hardcore]")
else
window:addChoice(value.id,""..i)
end
end
window:setDefaultEnterButton(100)
window:setDefaultEscapeButton(101)
window:sendToPlayer(player)
end
Bossmodal:aid(8770)
Bossmodal:register()
local BossRoom = CreatureEvent("BossRoom_window")
BossRoom:type("modalwindow")
function BossRoom.onModalWindow(player, modalWindowId, buttonId, choiceId)
if modalWindowId == 1800 then
if buttonId == 100 then
player:setStorageValue(8772, choiceId)
player:registerEvent("BossRoom_Hardness")
local title = "Bosses Hardness"
local message = "Hello"
local window = ModalWindow(1801, title, message)
window:addButton(100, "Choose")
window:addButton(101, "Cancel")
window:addChoice(1,"very Easy")
window:addChoice(2,"Easy")
window:addChoice(3,"Meduim")
window:addChoice(4,"Hard")
window:addChoice(5,"very Hard")
window:setDefaultEnterButton(100)
window:setDefaultEscapeButton(101)
window:sendToPlayer(player)
end
end
player:unregisterEvent("BossRoom_window")
return true
end
BossRoom:register()
local BossHardness = CreatureEvent("BossRoom_Hardness")
BossHardness:type("modalwindow")
local bossid = {"rat","demon"}
function BossHardness.onModalWindow(player, modalWindowId, buttonId, choiceId)
if modalWindowId == 1801 then
if buttonId == 100 then
local t = player:getStorageValue(8772)
if (player:getParty() ~= nil ) then
local party = player:getParty()
if (player:getParty():getLeader():getGuid() == player:getGuid()) then
if ( party:getMemberCount() > 4 or party:getMemberCount() == 0 ) then
player:sendCancelMessage("Your party doesn't have members yet or more than 5 members.")
return false
end
for _, member in ipairs(party:getMembers()) do
if member:isPzLocked() then
player:sendCancelMessage("Member Name: ["..member:getName().."] has PZ.")
return false
end
end
if getNextRoom() <= (configBoss.gridX * configBoss.gridY * configBoss.gridZ) then
local currentRoom = getNextRoom()
createRoom(getRoomPosFromIndex(getNextRoom()),bossid[t],choiceId)
setRoomInUse(currentRoom)
player:teleportTo( getRoomPosFromIndex(currentRoom))
player:setStorageValue(8770, currentRoom)
for _, member in ipairs(party:getMembers()) do
member:teleportTo( getRoomPosFromIndex(currentRoom))
member:setStorageValue(8770, currentRoom)
end
else
player:sendCancelMessage("All rooms are taken at the moment.")
player:teleportTo(fromPosition)
end
else
player:sendCancelMessage("Only Party Leader Can Create A room.")
return false
end
else
doPlayerSendCancel(player, "You must be in a party.")
return false
end
end
end
player:unregisterEvent("BossRoom_Hardness")
return true
end
BossHardness:register()
Lua:
local bosstile = MoveEvent()
bosstile:type("stepin")
function bosstile.onStepIn(player, item, position, fromPosition)
if item:getId() == 11062 then
local scored = ( player:getStorageValue(8771)-8770 +1)
local tot = (RoomRunning[player:getStorageValue(8770)][2] )
local mins = (((RoomRunning[player:getStorageValue(8770)][3]) - os.time())%3600) / 60
local secs = (((RoomRunning[player:getStorageValue(8770)][3]) - os.time())%3600) % 60
local secss
local minss
if (math.floor(mins) < 10) then
minss = "0".. math.floor(mins)
else
minss = math.floor(mins)
end
if (math.floor(secs) < 10) then
secss = "0".. math.floor(secs)
else
secss = math.floor(secs)
end
if (item:getActionId() - player:getStorageValue(8771)) == 1 then
player:setStorageValue(8771,player:getStorageValue(8771)+1)
player:getPosition():sendMagicEffect(7)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "you have Stepin "..scored.." / "..tot.." Tile.Left Time: "..minss.." minutes:"..secss.." seconds")
else
player:getPosition():sendMagicEffect(CONST_ME_SOUND_YELLOW)
end
return true
end
end
for i = 8771, 8790 do
bosstile:aid(i)
end
bosstile:register()
global events :
Lua:
local tp = {}
function tpCheck (i,poss)
local t = true
for _, spec in ipairs (Game.getSpectators(poss,false,true,0,31,0,31)) do
if tp[i][spec:getId()] == false then
t = false
end
end
return t
end
function checkP(t)
local m = true
for _,spec in pairs (t) do
if spec:isPlayer() then
m = false
end
end
return m
end
function onThink(player, interval, lastExecution)
for i, value in pairs(RoomRunning) do
print(i,value)
for k, y in pairs(value) do
print(k,y)
end
end
for i, value in pairs(RoomRunning) do
if RoomRunning[i] ~= nil then
print(os.time())
print(RoomRunning[i][3])
print("index"..i)
local pos= (getRoomPosFromIndex(i))
local poss = {x = pos.x-15, y = pos.y-15, z = pos.z}
if (RoomRunning[i][3] <= os.time()) then
local pp ={} --Save all players in each room and check if they have done the task.
local specTable = Game.getSpectators(poss,false,false,0,31,0,31)
if tp[i] == nil and (checkP(specTable))== false then
for _, spec in ipairs (specTable) do
if spec:isMonster() then
pp[spec:getId()] = true
else
if RoomRunning [i][1] == "lever" or RoomRunning [i][1] == "stepin" then
if (spec:getStorageValue(8771) == (RoomRunning[i][2] + 8770)) then
pp[spec:getId()] = true
else
if RoomRunning[i][4] == "yes" then
pp[spec:getId()] = false
else
spec:addHealth(-spec:getMaxHealth())
spec:setStorageValue(8770,0)
spec:setStorageValue(8771,0)
end
end
else
if spec:getStorageValue(8771) == RoomRunning[i][2] then
pp[spec:getId()]= true
else
if RoomRunning[i][4] == "yes" then
pp[spec:getId()] = false
else
spec:addHealth(-spec:getMaxHealth())
spec:setStorageValue(8770,0)
spec:setStorageValue(8771,0)
end
end
end
end
end
tp[i] = pp
else
if checkP(specTable) then
--if Boss killed the players..
for _, spec in ipairs (specTable) do
if spec:isMonster() then
monsterRunning[spec:getId()] = nil
end
end
table.remove(RoomRunning,i)
deleteRoom(pos)
setRoomUnused(i)
table.remove(tp,i)
end
if tpCheck(i,poss) == false and RoomRunning[i][4]== "yes" then
for _, spec in ipairs (specTable) do
if spec:isMonster() then
monsterRunning[spec:getId()] = nil
else
spec:setStorageValue(8770,0)
spec:setStorageValue(8771,0)
-- spec:addHealth(-spec:getHealth())
spec:getPosition():sendMagicEffect(7)
end
end
table.remove(RoomRunning,i)
deleteRoom(pos)
setRoomUnused(i)
table.remove(tp,i)
return false
else
for _, spec in ipairs (specTable) do
if spec:isMonster() then
monsterRunning[spec:getId()] = nil
spec:getPosition():sendMagicEffect(CONST_ME_SOUND_YELLOW)
if ( RoomRunning [i][1] == "lever")then
for j=1 ,#RoomP[i] do
local thing = Tile()
local item = Tile(RoomP[i][j]):getItemById(1945)
if item then
item:remove()
end
end
elseif (RoomRunning [i][1] == "stepin") then
for j=1 ,#RoomP[i] do
local thing = getThingfromPos(RoomP[i][j])
if thing.itemid == 11062 then
Game.createItem(406,1,RoomP[i][j])
end
end
end
table.remove(RoomRunning,i)
table.remove(tp,i)
return true
end
end
end
end
end
end
end
return true
end
EVents / player >> function player on turn
Lua:
function getTurnName(index)
local turnName=""
if index == 0 then
turnName="north"
elseif index==1 then
turnName= "East"
elseif index==2 then
turnName= "South"
elseif index==3 then
turnName= "West"
end
return turnName
end
function Player:onTurn(direction)
local i =self:getStorageValue(8770)
if i > 0 then
if RoomRunning[i] ~= nil then
if RoomRunning[i][1] == "turn" then
if (RoomRunning[i][3] > os.time()) then
if direction== TurnRunning[i][self:getStorageValue(8771)+1] then
self:setStorageValue(8771,self:getStorageValue(8771)+1)
if self:getStorageValue(8771) < #TurnRunning[i] then
local NextTurn = TurnRunning[i][self:getStorageValue(8771)+1]
self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Turn "..getTurnName(NextTurn).." ")
else
self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE,"Done.")
end
end
end
end
end
end
return true
end
Attachments
-
Paypal report.png91.6 KB · Views: 49 · VirusTotal
-
carco and adver.png42.1 KB · Views: 51 · VirusTotal
-
bossroom.zip8.1 KB · Views: 12 · VirusTotal
Last edited: