First create a table, perhaps called orcs_memory
Btw, this is just off the top of my head. I cannot confirm w
Create table with the following columns:
party_id (needs to be integer)
party_name (needs to be string)
time (needs to be string)
Sorry, I'm still noob.
wanted to have 5 members only in party.
so that in checking NPC
Dungeon Record holder
Partyname: Member1, member2, member3, member4, member5.
I have this,
Is this correct?
CREATE TABLE IF NOT EXISTS `Orcs` (
`party_id` MEDIUMINT(7) NOT NULL DEFAULT '0',
`party_name` VARCHAR(24) NOT NULL,
`Name1` MEDIUMINT(6) NOT NULL DEFAULT '0',
`Name2` MEDIUMINT(6) NOT NULL DEFAULT '0',
`Name3` MEDIUMINT(6) NOT NULL DEFAULT '0',
`Name4` MEDIUMINT(6) NOT NULL DEFAULT '0',
`Name5` MEDIUMINT(6) NOT NULL DEFAULT '0',
`date_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
UNIQUE KEY `date` (`date_time`,`party_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
I have error,
Added this:
//== Entrance ==============================================
2@orcs,1,1,0 script Orcs_Memory_Timer FAKE_NPC,{
end;
}
gef_fild10,242,202,0 script Dimensional Gorge Piece 2_MONEMUS,{
.@party_id = getcharid(CHAR_ID_PARTY);
.@p_name$ = getpartyname(.@party_id);
.@md_name$ = "Orc's Memory";
Code:
OnMyMobDead:
stopnpctimer("Orcs_Memory_Timer");
.@PID = getcharid(CHAR_ID_PARTY);
.@PN$ = getpartyname(.@PID);
.@time = getnpctimer("Orcs_Memory_Timer") / 1000;
if (.@time < $Orcs_Memory_Record)
{
// This next bit will display time as 00:00:00 format
.@hour$ = .@time % (24*60*60) / (60*60) + "";
.@min$ = .@time % (24*60*60) % (60*60) / (60) + "";
.@sec$ = .@time % (24*60*60) % (60*60) % (60) + "";
.@time$ = "" +(getstrlen(.@hour$) == 1 ? "0" : "")+ "" + .@hour$ + ":" +(getstrlen(.@min$) == 1 ? "0" : "")+ "" + .@min$ + ":" +(getstrlen(.@sec$) == 1 ? "0" : "")+ "" + .@sec$ + "";
announce("The " + getpartyname(CHAR_ID_PARTY) + " party cleared the dungeon in " + .@time$ + ", a new record!", bc_all);
$Orcs_Memory_Record = .@time;
}
query_sql("INSERT INTO `orcs_memory` VALUES (" + .@PID + ", '" + escape_sql(.@PN$) + "', '" + .@time$ + "')");
donpcevent instance_npcname("Kruger#")+"::OnEnable";
.@map$ = instance_mapname("2@orcs");
.@mob_ran = rand(1,5);
if (.@mob_ran == 1) {
mapannounce .@map$, "Shaman Cargalache: How... How could this be... How could someone like you...!!",bc_map,"0xffff00";
}
else if (.@mob_ran == 2) {
mapannounce .@map$, "Shaman Cargalache: How is it that I've been overpowered by mere humans!",bc_map,"0xffff00";
}
else if (.@mob_ran == 3) {
mapannounce .@map$, "Shaman Cargalache: This... This can't be the end...",bc_map,"0xffff00";
}
else if (.@mob_ran == 4) {
mapannounce .@map$, "Shaman Cargalache: I... Can't die... Yet...!",bc_map,"0xffff00";
}
else {
mapannounce .@map$, "Shaman Cargalache: Defeated by these fools... It can't be happening...!",bc_map,"0xffff00";
}
donpcevent instance_npcname("#2Resurrect Monsters1")+"::OnDisable";
donpcevent instance_npcname("#2Resurrect Monsters3")+"::OnDisable";
donpcevent instance_npcname("#Warp Outside Orc Dun")+"::OnEnable";
end;
}
Resulted to
Code:
[Warning]: Unexpected type for argument 1. Expected number.
[Debug]: Data: string value="Orcs_Memory_Timer"
[Debug]: Function: getnpctimer
[Debug]: Source (NPC): #Boss Control at 0002@orcs (36,171)
[SQL]: DB error - Column count doesn't match value count at row 1
[Debug]: at d:\rao\hercules-master\src\map\script.c:17167 - INSERT INTO `orcs_memory` VALUES (0, '', '')
[Debug]: Source (NPC): #Boss Control at 0002@orcs (36,171)