hustlamike
Shit happens.
- Joined
- Dec 23, 2007
- Messages
- 134
- Reaction score
- 0
@ Elf... I have not started to switch over yet still usein alpha 4 i just got it up and was testing it so..
zapytanie SQL:
CREATE TABLE `bans` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`type` TINYINT( 1 ) NOT NULL COMMENT 'this field defines if its ip, account, player, or any else ban',
`value` INT UNSIGNED NOT NULL COMMENT 'ip, player guid, account number',
`param` INT UNSIGNED NOT NULL DEFAULT 4294967295 COMMENT 'mask',
`active` TINYINT( 1 ) NOT NULL DEFAULTTRUE,
`expires` INT NOT NULL ,
`added` INT UNSIGNED NOT NULL ,
`admin_id` INT UNSIGNED NOT NULL DEFAULT 0,
`comment` TEXT NOT NULL ,
`reason` INT UNSIGNED NOT NULL DEFAULT 0,
`action` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY ( `id` ) ,
KEY `type` ( `type` , `value` ) KEY `active` ( `active` )
) ENGINE = InnoDB;
MySQL zwrócił komunikat: Dokumentacja
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY `active` (`active`)
) ENGINE = InnoDB' at line 16
[01/12/2008 00:27:28] Lua Script Error: [CreatureScript Interface]
[01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua:onLogin
[01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua:12: attempt to compare string with number
[01/12/2008 00:27:28] stack traceback:
[01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua:12: in function <data/creaturescripts/scripts/login.lua:1>
function onLogin(cid)
registerCreatureEvent(cid, "PlayerKill")
if (InitArenaScript ~= 0) then
InitArenaScript = 1
-- make arena rooms free
for i = 42300, 42309 do
setGlobalStorageValue(i, 0)
setGlobalStorageValue(i+100, 0)
end
end
-- if he did not make full arena 1 he must start from zero
if getPlayerStorageValue(cid, 42309) < 1 then
for i = 42300, 42309 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 2 he must start from zero
if getPlayerStorageValue(cid, 42319) < 1 then
for i = 42310, 42319 do
setPlayerStorageValue(cid, i, 0)
end
end
-- if he did not make full arena 3 he must start from zero
if getPlayerStorageValue(cid, 42329) < 1 then
for i = 42320, 42329 do
setPlayerStorageValue(cid, i, 0)
end
end
if getPlayerStorageValue(cid, 42355) == -1 then
setPlayerStorageValue(cid, 42355, 0) -- did not arena level
end
setPlayerStorageValue(cid, 42350, 0) -- time to kick 0
setPlayerStorageValue(cid, 42352, 0) -- is not in arena
if getPlayerStorageValue(cid, 13718) == 1 then
doTeleportThing(cid, test.basepos, TRUE)
setPlayerStorageValue(cid, 13718, FALSE)
doPlayerSetLossPercent(cid, exp, 0)
else
doPlayerSetLossPercent(cid, exp, 2)
end
if getPlayerLevel(cid) < 100 then
doCreatureSetDropLoot(cid, 0)
doShowTextDialog(cid, 2173, "You are below level 100.\nYou will not lose any items when dying.\n\nRemember to buy an Amulet of loss when you reach level 100.")
end
registerCreatureEvent(cid, "PlayerDeath")
return TRUE
end
actions.xml and talkactions.xmlwell, what did I actually miss? Is it in the lib? xml?
yeah ._.raids been fixed?
PHP:[01/12/2008 00:27:28] Lua Script Error: [CreatureScript Interface] [01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua:onLogin [01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua:12: attempt to compare string with number [01/12/2008 00:27:28] stack traceback: [01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua:12: in function <data/creaturescripts/scripts/login.lua:1>
using gesiors arena script...
PHP:function onLogin(cid) registerCreatureEvent(cid, "PlayerKill") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end -- if he did not make full arena 1 he must start from zero if getPlayerStorageValue(cid, 42309) < 1 then for i = 42300, 42309 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 2 he must start from zero if getPlayerStorageValue(cid, 42319) < 1 then for i = 42310, 42319 do setPlayerStorageValue(cid, i, 0) end end -- if he did not make full arena 3 he must start from zero if getPlayerStorageValue(cid, 42329) < 1 then for i = 42320, 42329 do setPlayerStorageValue(cid, i, 0) end end if getPlayerStorageValue(cid, 42355) == -1 then setPlayerStorageValue(cid, 42355, 0) -- did not arena level end setPlayerStorageValue(cid, 42350, 0) -- time to kick 0 setPlayerStorageValue(cid, 42352, 0) -- is not in arena if getPlayerStorageValue(cid, 13718) == 1 then doTeleportThing(cid, test.basepos, TRUE) setPlayerStorageValue(cid, 13718, FALSE) doPlayerSetLossPercent(cid, exp, 0) else doPlayerSetLossPercent(cid, exp, 2) end if getPlayerLevel(cid) < 100 then doCreatureSetDropLoot(cid, 0) doShowTextDialog(cid, 2173, "You are below level 100.\nYou will not lose any items when dying.\n\nRemember to buy an Amulet of loss when you reach level 100.") end registerCreatureEvent(cid, "PlayerDeath") return TRUE end
i have this wrong wen i add to base sql
Code:zapytanie SQL: CREATE TABLE `bans` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `type` TINYINT( 1 ) NOT NULL COMMENT 'this field defines if its ip, account, player, or any else ban', `value` INT UNSIGNED NOT NULL COMMENT 'ip, player guid, account number', `param` INT UNSIGNED NOT NULL DEFAULT 4294967295 COMMENT 'mask', `active` TINYINT( 1 ) NOT NULL DEFAULTTRUE, `expires` INT NOT NULL , `added` INT UNSIGNED NOT NULL , `admin_id` INT UNSIGNED NOT NULL DEFAULT 0, `comment` TEXT NOT NULL , `reason` INT UNSIGNED NOT NULL DEFAULT 0, `action` INT UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY ( `id` ) , KEY `type` ( `type` , `value` ) KEY `active` ( `active` ) ) ENGINE = InnoDB; MySQL zwrócił komunikat: Dokumentacja #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY `active` (`active`) ) ENGINE = InnoDB' at line 16
i use xampp 1.6.8
and change to this:PRIMARY KEY (`id`),
KEY `type` (`type`, `value`)
KEY `active` (`active`)
PRIMARY KEY (`id`),
KEY `type` (`type`, `value`),
KEY `active` (`active`)
Great!
Glad you added lastHitKiller and mostDamageKiller to onDeath
I always had one question, what's the difference between onDeath and onPrepareDeath?
zapytanie SQL:
CREATE TABLE `player_skills` (
`player_id` INT NOT NULL DEFAULT 0,
`skillid` TINYIT( 2 ) NOT NULL DEFAULT 0,
`value` INT UNSIGNED NOT NULL DEFAULT 0,
`count` INT UNSIGNED NOT NULL DEFAULT 0,
KEY ( `player_id` ) ,
UNIQUE (
`player_id` ,
`skillid`
),
FOREIGN KEY ( `player_id` ) REFERENCES `players` ( `id` ) ON DELETE CASCADE
) ENGINE = InnoDB;
MySQL zwrócił komunikat: Dokumentacja
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TINYIT(2) NOT NULL DEFAULT 0,
`value` INT UNSIGNED NOT NULL DEFAULT 0,
`coun' at line 4
zapytanie SQL:
CREATE TABLE `tiles` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
`x` INT( 5 ) UNSIGNED NOT NULL ,
`y` INT( 5 ) UNSIGNED NOT NULL ,
`z` TINYINT( 2 ) UNSIGNED NOT NULL ,
PRIMARY KEY ( `id` ) KEY ( `x` , `y` , `z` )
) ENGINE = InnoDB;
MySQL zwrócił komunikat: Dokumentacja
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY (`x`, `y`, `z`)
) ENGINE = InnoDB' at line 8
actions.xml and talkactions.xml
yeah ._.
Seems like there will be a pl1 tomorrow- missing , at schema.mysql and player storage not working properly.
Open your schema.mysql and find:
and change to this:
for storage, just make tonumber(getPlayerStorageValue(cid, 42003))
for these you have to check aren't they same (mostDamage and lastHit killers).
onPrepareDeath is called exactly before death and can deny it and onDeath is called at the end.
-- if he did not make full arena 1 he must start from zero
if getPlayerStorageValue(cid, 42309) < 1 then
[01/12/2008 00:27:28] Lua Script Error: [CreatureScript Interface]
[01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua nLogin
[01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua:12: attempt to compare string with number
[01/12/2008 00:27:28] stack traceback:
[01/12/2008 00:27:28] data/creaturescripts/scripts/login.lua:12: in function <data/creaturescripts/scripts/login
data/lib
global.lua is called constant.lua now... you cant replace this with ur old global, so all functions, events and such must be copied manually
what is this:
pk rabit? ;>