Forum

> > CS2D > Scripts > RPG Server Bug After version 0.1.1.9
Forums overviewCS2D overview Scripts overviewLog in to reply

English RPG Server Bug After version 0.1.1.9

20 replies
Page
To the start Previous 1 2 Next To the start

moved RPG Server Bug After version 0.1.1.9

Bobakrome
User Off Offline

Quote
Hi there, my name is «Hâñøkäkûrã.ro» (also my CS2D nick) , and after download and install the 0.1.1.9 version (1st i do it in another folder, for test) and in the test i tried to remake my RPG server (RPG.Anasty) and dont worked then i install it in original, then tried to make server time of 1 hour and...nothing.My lua doesn't work. Please help me. I hope to solve it in 48 hours, Thanks!

Admin/mod comment

moved

old Re: RPG Server Bug After version 0.1.1.9

DC
Admin Off Offline

Quote
yeah okay.. you basically say that it is not working. that is a useless information. we can't help you that way.

what exactly doesn't work?
what error message do you see (console)?
you probably just didn't install it correctly because there are no changes on existing Lua commands/hooks

old Re: RPG Server Bug After version 0.1.1.9

Bobakrome
User Off Offline

Quote
Okay,I mean when i start server,gives me weapon, can buy from shop, doesn't show NPC,s/Monsters/Equip/Level/Money etc. What I say..? The Lua It's not running. Doesn't start/work.Yes, It's about RPG script, its not running in



~Edited
edited 1×, last 25.03.11 09:58:07 pm

old Re: RPG Server Bug After version 0.1.1.9

DC
Admin Off Offline

Quote
read the install instructions for tibia. I'm 100% sure that you didn't set up this thing correctly. this probme can not be caused by the new version.

old Re: RPG Server Bug After version 0.1.1.9

Bobakrome
User Off Offline

Quote
map is okay, idk what's with ysize.map i never see or hear about it, i think the problem is in "sys/lua/cs2dtibia/server.lua:20: 'for' limit must be a number" , and admin, I know how to set up my server, i do this "hundred times"

old Re: RPG Server Bug After version 0.1.1.9

Hador
User Off Offline

Quote
WannaBe has written
map is okay, idk what's with ysize.map i never see or hear about it, i think the problem is in "sys/lua/cs2dtibia/server.lua:20: 'for' limit must be a number"


yes, but that is most likely to be a rather important thing having a missing map, as the map cannot be played if it does not exist.

the second error looks like a bug in the lua, and as far as i know it means that you're missing a limiting variable to limit one or the other thing.

just check if you haven't maybe edited the script, reread the instructions and if it doesn't work contact the writer of the script.

old Re: RPG Server Bug After version 0.1.1.9

Bobakrome
User Off Offline

Quote
Quote
print('initialising...')
dofile('sys/lua/wrapper.lua')
math.randomseed(os.time())

dir = 'sys/lua/cs2dtibia/'
dofile(dir .. 'config.lua')

EXPTABLE = {}
for level = 1, 500 do
     EXPTABLE[level] = CONFIG.EXP.CALC(level)
end
EXPTABLE.__index = function(t, k)
     t[k] = CONFIG.EXP.CALC(k)
     return t[k]
end
setmetatable(EXPTABLE, EXPTABLE)

GROUNDITEMS = {}
TILEZONE = {}
for y = 0, map'ysize' do
     GROUNDITEMS[y], TILEZONE[y] = {}, {}
     for x = 0, map'xsize' do
          GROUNDITEMS[y][x], TILEZONE[y][x] = {}, {}
          for i, v in ipairs(SAFEZONE) do
               TILEZONE[y][x].SAFE = (x >= v[1][1] and x <= v[2][1] and y >= v[1][2] and y <= v[2][2])
               if TILEZONE[y][x].SAFE then break end
          end
          for i, v in ipairs(PVPZONE) do
               TILEZONE[y][x].PVP = (x >= v[1][1] and x <= v[2][1] and y >= v[1][2] and y <= v[2][2]) and i or nil
               if TILEZONE[y][x].PVP then
                    TILEZONE[y][x].SAFE = false
                    break
               end
          end
          for i, v in ipairs(HOUSES) do
               TILEZONE[y][x].HOUSE = (x >= v.pos1[1] and x <= v.pos2[1] and y >= v.pos1[2] and y <= v.pos2[2]) and i or nil
               TILEZONE[y][x].HOUSEDOOR = (x == v.door[1] and y == v.door[2]) and i or nil
               TILEZONE[y][x].HOUSEENT = (x == v.ent[1] and y == v.ent[2]) and i or nil
               if TILEZONE[y][x].HOUSE or TILEZONE[y][x].HOUSEDOOR or TILEZONE[y][x].HOUSEENT then break end
          end
     end
end

PLAYERS = {}
PLAYERCACHE = {}

HUDImage = image('gfx/weiwen/1x1.png', 565, 407+#CONFIG.STATS*CONFIG.PIXELS/2, 2)
imagescale(HUDImage, 130,CONFIG.PIXELS+#CONFIG.STATS*CONFIG.PIXELS)
imagealpha(HUDImage, 0.5)

SKY = image('gfx/weiwen/1x1.png',320,240,2)
imagescale(SKY,640,480)
imagecolor(SKY,0,0,32)

MINUTES = 0
GLOBAL = {}
GLOBAL.TIME = 0
GLOBAL.RAIN = 0

dofile(dir .. 'functions.lua')
dofile(dir .. 'admin.lua')
dofile(dir .. 'commands.lua')
dofile(dir .. 'items.lua')
dofile(dir .. 'npcs.lua')
if CONFIG.MAXMONSTERS > 0 then
     dofile(dir .. 'monsters.lua')
end
dofile(dir .. 'hooks.lua')

HUDRadar = image("gfx/weiwen/pokeball.png", 53, 53, 2)

TMPGROUNDITEMS = {}
TMPHOUSES = {}
local file = io.open(dir .. "saves/" .. map'name' .. ".lua")
if file then
     io.close(file)
     dofile(dir .. "saves/" .. map'name' .. ".lua")
     for y = 0, map'ysize' do
          if TMPGROUNDITEMS[y] then
               for x = 0, map'xsize' do
                    if TMPGROUNDITEMS[y][x] then
                         for _, j in ipairs(TMPGROUNDITEMS[y][x]) do
                              if j < 0 then
                                   spawnitem(1337, x, y, -j)
                              else
                                   spawnitem(j, x, y)
                              end
                         end
                    end
               end
          end
     end
     for i, v in pairs(TMPHOUSES) do
          for k, l in pairs(v) do
               HOUSES[i][k] = l
          end
     end
     TMPGROUNDITEMS = nil
     TMPHOUSES = nil
end
local file = io.open(dir .. "saves/players.lua")
if file then
     io.close(file)
     dofile(dir .. "saves/players.lua")
end
file = nil

parse("mp_infammo 1")
parse("mp_deathdrop 4")
parse("sv_password " .. CONFIG.PASSWORD)

print('initialisation comleted!')



What could be wrong....

old Re: RPG Server Bug After version 0.1.1.9

DC
Admin Off Offline

Quote
okay found the problem

EDIT: WAIT I was wrong... there's a pretty stupid problem. it is caused by my updated wrapper.lua
either copy the old wrapper.lua into that folder or edit wrapper.lua and remove the map-function from it.

sorry about that.
edited 4×, last 25.03.11 10:17:53 pm

old Re: RPG Server Bug After version 0.1.1.9

Bobakrome
User Off Offline

Quote
okay, i will try
I tried, then when i started server it frozes at "Loading Map ; Generating Tile Effects" i think i have to do an copy of normal map....Same Thing....
Edit:
Erm wait i dont understand...
plz lets speak on an xat channel, got to be easy?
http://www.xat.com/chat/room/137647633/
Edit2:
I have to go sleep guys, speak again next morning (in 8 hours)
edited 2×, last 25.03.11 10:26:45 pm

old Re: RPG Server Bug After version 0.1.1.9

DC
Admin Off Offline

Quote
• just open sys/lua/wrapper.lua with a text editor
• search and remove the following lines
1
2
3
function map(map)
	parse("map "..map)
end
• save your changes
√ done. problem solved.
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview