max 100 okrutnosci i za kazde 5 okrutnosci 1 dodatkowe obrazenia.
Więc zrobiłem tak:
1.To:
new player_xp[33] = 0 //Holds players experience
new player_lvl[33] = 1 //Holds players level
new player_point[33] = 0 //Holds players level points
new player_item_id[33] = 0 //Items id
new player_item_name[33][128] //The items name
new player_intelligence[33]
new player_strength[33]
new player_agility[33]
new Float:player_damreduction[33]
new player_dextery[33]
new player_class[33]
new Float:player_huddelay[33]
Zmieniłem na to:
new player_xp[33] = 0 //Holds players experience
new player_lvl[33] = 1 //Holds players level
new player_point[33] = 0 //Holds players level points
new player_item_id[33] = 0 //Items id
new player_item_name[33][128] //The items name
new player_intelligence[33]
new player_strength[33]
new player_agility[33]
new player_okrutnosc[33]
new Float:player_damreduction[33]
new player_dextery[33]
new player_class[33]
new Float:player_huddelay[33]
2.To:
get_cvar_string("diablo_sql_table",g_sqlTable,63)
new q_command[512]
format(q_command,511,"CREATE TABLE IF NOT EXISTS `%s` ( `nick` VARCHAR( 64 ),`ip` VARCHAR( 64 ),`sid` VARCHAR( 64 ), `klasa` integer( 2 ) , `lvl` integer( 3 ) DEFAULT 1, `exp` integer( 9 ) DEFAULT 0, `str` integer( 3 ) DEFAULT 0, `int` integer( 3 ) DEFAULT 0, `dex` integer( 3 ) DEFAULT 0, `agi` integer( 3 ) DEFAULT 0 ) ",g_sqlTable)
Zmieniłem na:
get_cvar_string("diablo_sql_table",g_sqlTable,63)
new q_command[512]
format(q_command,511,"CREATE TABLE IF NOT EXISTS `%s` ( `nick` VARCHAR( 64 ),`ip` VARCHAR( 64 ),`sid` VARCHAR( 64 ), `klasa` integer( 2 ) , `lvl` integer( 3 ) DEFAULT 1, `exp` integer( 9 ) DEFAULT 0, `str` integer( 3 ) DEFAULT 0, `int` integer( 3 ) DEFAULT 0, `dex` integer( 3 ) DEFAULT 0, `agi` integer( 3 ) DEFAULT 0, `okr` integer( 3 ) DEFAULT 0 ) ",g_sqlTable)
3.To:
if(get_cvar_num("diablo_sql_save")==0)
{
new q_command[512]
format(q_command,511,"UPDATE `%s` SET `ip`='%s',`sid`='%s',`lvl`='%i',`exp`='%i',`str`='%i',`int`='%i',`dex`='%i',`agi`='%i' WHERE `nick`='%s' AND `klasa`='%i' ",g_sqlTable,ip,sid,player_lvl[id],player_xp[id],player_strength[id],player_intelligence[id],player_dextery[id],player_agility[id],name,player_class[id])
Zmieniłem na:
new q_command[512]
format(q_command,511,"UPDATE `%s` SET `ip`='%s',`sid`='%s',`lvl`='%i',`exp`='%i',`str`='%i',`int`='%i',`dex`='%i',`agi`='%i',`okr`='%i' WHERE `nick`='%s' AND `klasa`='%i' ",g_sqlTable,ip,sid,player_lvl[id],player_xp[id],player_strength[id],player_intelligence[id],player_dextery[id],player_agility[id],player_okrutnosc[id],name,player_class[id])
4.To:
else if(get_cvar_num("diablo_sql_save")==1)
{
new q_command[512]
format(q_command,511,"UPDATE `%s` SET `nick`='%s',`sid`='%s',`lvl`='%i',`exp`='%i',`str`='%i',`int`='%i',`dex`='%i',`agi`='%i' WHERE `ip`='%s' AND `klasa`='%i' ",g_sqlTable,name,sid,player_lvl[id],player_xp[id],player_strength[id],player_intelligence[id],player_dextery[id],player_agility[id],ip,player_class[id])
Zmieniłem na:
else if(get_cvar_num("diablo_sql_save")==1)
{
new q_command[512]
format(q_command,511,"UPDATE `%s` SET `nick`='%s',`sid`='%s',`lvl`='%i',`exp`='%i',`str`='%i',`int`='%i',`dex`='%i',`agi`='%i',`okr`='%i' WHERE `ip`='%s' AND `klasa`='%i' ",g_sqlTable,name,sid,player_lvl[id],player_xp[id],player_strength[id],player_intelligence[id],player_dextery[id],player_agility[id],player_okrutnosc[id],ip,player_class[id])
5.To:
else if(get_cvar_num("diablo_sql_save")==2)
{
new q_command[512]
format(q_command,511,"UPDATE `%s` SET `nick`='%s',`ip`='%s',`lvl`='%i',`exp`='%i',`str`='%i',`int`='%i',`dex`='%i',`agi`='%i' WHERE `sid`='%s' AND `klasa`='%i' ",g_sqlTable,name,ip,player_lvl[id],player_xp[id],player_strength[id],player_intelligence[id],player_dextery[id],player_agility[id],sid,player_class[id])
Zmieniłem na:
else if(get_cvar_num("diablo_sql_save")==2)
{
new q_command[512]
format(q_command,511,"UPDATE `%s` SET `nick`='%s',`ip`='%s',`lvl`='%i',`exp`='%i',`str`='%i',`int`='%i',`dex`='%i',`agi`='%i',`okr`='%i' WHERE `sid`='%s' AND `klasa`='%i' ",g_sqlTable,name,ip,player_lvl[id],player_xp[id],player_strength[id],player_intelligence[id],player_dextery[id],player_agility[id],player_okrutnosc[id],sid,player_class[id])
6.To:
player_class[id] = Data[1]
player_lvl[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"lvl"))
player_xp[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"exp"))
player_xp_old[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"exp"))
player_intelligence[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"int"))
player_strength[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"str"))
player_agility[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"agi"))
player_dextery[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"dex"))
player_point[id]=(player_lvl[id]-1)*2-player_intelligence[id]-player_strength[id]-player_dextery[id]-player_agility[id]
if(player_point[id]<0) player_point[id]=0
player_damreduction[id] = (47.3057*(1.0-floatpower( 2.7182, -0.06798*float(player_agility[id])))/100)
}
Zmieniłem na:
player_class[id] = Data[1]
player_lvl[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"lvl"))
player_xp[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"exp"))
player_xp_old[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"exp"))
player_intelligence[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"int"))
player_strength[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"str"))
player_agility[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"agi"))
player_dextery[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"dex"))
player_dextery[id] = SQL_ReadResult(Query,SQL_FieldNameToNum(Query,"okr"))
player_point[id]=(player_lvl[id]-1)*2-player_intelligence[id]-player_strength[id]-player_dextery[id]-player_agility[id]-player_okrutnosc[id]
if(player_point[id]<0) player_point[id]=0
player_damreduction[id] = (47.3057*(1.0-floatpower( 2.7182, -0.06798*float(player_agility[id])))/100)
}
7.To
public reset_skill(id)
{
client_print(id,print_chat,"Zresetowales Statystyki")
player_point[id] = player_lvl[id]*2-2
player_intelligence[id] = 0
player_strength[id] = 0
player_agility[id] = 0
player_dextery[id] = 0
BoostRing(id)
BoostStats(id,player_b_extrastats[id])
skilltree(id)
set_speedchange(id)
player_damreduction[id] = (47.3057*(1.0-floatpower( 2.7182, -0.06798*float(player_agility[id])))/100)
}
Zmieniłem na:
public reset_skill(id)
{
client_print(id,print_chat,"Zresetowales Statystyki")
player_point[id] = player_lvl[id]*2-2
player_intelligence[id] = 0
player_strength[id] = 0
player_agility[id] = 0
player_dextery[id] = 0
player_okrutnosc[id] = 0
BoostRing(id)
BoostStats(id,player_b_extrastats[id])
skilltree(id)
set_speedchange(id)
player_damreduction[id] = (47.3057*(1.0-floatpower( 2.7182, -0.06798*float(player_agility[id])))/100)
}
8.To:
SubtractStats(id,player_b_extrastats[id])
SubtractRing(id)
if ((player_intelligence[id]+player_strength[id]+player_agility[id]+player_dextery[id])>(player_lvl[id]*2)) reset_skill(id)
Zmieniłem na:
SubtractStats(id,player_b_extrastats[id])
SubtractRing(id)
if ((player_intelligence[id]+player_strength[id]+player_agility[id]+player_dextery[id]+player_okrutnosc[id])>(player_lvl[id]*2)) reset_skill(id)
9.To:
public skilltree(id)
{
new text[513]
new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)
format(text, 512, "\yWybierz Staty- \rPunkty: %i^n^n\w1. Inteligencja [%i] [Wieksze obrazenia czarami]^n\w2. Sila [%i] [Wiecej zycia]^n\w3. Zrecznosc [%i] [Bronie zadaja ci mniejsze obrazenia]^n\w4. Zwinnosc [%i] [Szybciej biegasz i magia zadaje ci mniejsze obrazenia]",player_point[id],player_intelligence[id],player_strength[id],player_agility[id],player_dextery[id])
keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)
show_menu(id, keys, text)
return PLUGIN_HANDLED
Zmieniłem na:
public skilltree(id)
{
new text[513]
new keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)
format(text, 512, "\yWybierz Staty- \rPunkty: %i^n^n\w1. Inteligencja [%i] [Wieksze obrazenia czarami]^n\w2. Sila [%i] [Wiecej zycia]^n\w3. Zrecznosc [%i] [Bronie zadaja ci mniejsze obrazenia]^n\w4. Zwinnosc [%i] [Szybciej biegasz i magia zadaje ci mniejsze obrazenia]^n\w5. Okrutnosc [%i] [Dodatkowe %i Obrazen]",player_point[id],player_intelligence[id],player_strength[id],player_agility[id],player_dextery[id],player_okrutnosc[id],player_b_damage[id])
keys = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)| (1<<7)
show_menu(id, keys, text)
return PLUGIN_HANDLED
}
10.Niżej obok case 3;zwinosc dodalem:
case 4:
{
if (player_okrutnosc[id]<100){
player_point[id]-=1
player_dextery[id]+=1
player_b_damage[id] = (47.3057*(1.0-floatpower( 2.7182, -0.06798*float(player_okrutnosc[id])))/100)
}
else client_print(id,print_center,"Masz juz full Okrutnosci")
}
11.To:
public client_connect(id)
{
// reset_item_skills(id) - nie tutaj bo nie loaduje poziomow
asked_sql[id]=0
flashbattery[id] = MAX_FLASH
player_xp[id] = 0
player_lvl[id] = 1
player_point[id] = 0
player_item_id[id] = 0
player_agility[id] = 0
player_strength[id] = 0
player_intelligence[id] = 0
player_dextery[id] = 0
player_b_oldsen[id] = 0.0
player_class[id] = 0
player_damreduction[id] = 0.0
last_update_xp[id] = -1
player_item_name[id] = "Brak"
DemageTake[id]=0
player_b_gamble[id]=0
Zamieniłem na:
public client_connect(id)
{
// reset_item_skills(id) - nie tutaj bo nie loaduje poziomow
asked_sql[id]=0
flashbattery[id] = MAX_FLASH
player_xp[id] = 0
player_lvl[id] = 1
player_point[id] = 0
player_item_id[id] = 0
player_agility[id] = 0
player_strength[id] = 0
player_intelligence[id] = 0
player_dextery[id] = 0
player_okrutnosc[id] = 0
player_b_oldsen[id] = 0.0
player_class[id] = 0
player_damreduction[id] = 0.0
last_update_xp[id] = -1
player_item_name[id] = "Brak"
DemageTake[id]=0
player_b_gamble[id]=0
g_GrenadeTrap[id] = 0
g_TrapMode[id] = 0
12.To:
new Msg[512]
set_hudmessage(255, 255, 255, 0.78, 0.65, 0, 6.0, 3.0)
format(Msg,511,"Nick: %s^nPoziom: %i^nKlasa: %s^nPrzedmiot: %s^nInteligencja: %i^nSila: %i^nZwinnosc: %i^nZrecznosc: %i",pname,player_lvl[index],Race[player_class[index]],player_item_name[index], player_intelligence[index],player_strength[index], player_dextery[index], player_agility[index])
show_hudmessage(id, Msg)
Zmieniłem na:
new Msg[512]
set_hudmessage(255, 255, 255, 0.78, 0.65, 0, 6.0, 3.0)
format(Msg,511,"Nick: %s^nPoziom: %i^nKlasa: %s^nPrzedmiot: %s^nInteligencja: %i^nSila: %i^nZwinnosc: %i^nZrecznosc: %i^nOkrutnosc: %i",pname,player_lvl[index],Race[player_class[index]],player_item_name[index], player_intelligence[index],player_strength[index], player_dextery[index], player_agility[index],player_okrutnosc[index])
show_hudmessage(id, Msg)
13.To:
public Bot_Setup()
{
for (new id=0; id < MAX; id++)
{
if (is_user_connected(id) && is_user_bot(id))
{
if (random_num(1,3) == 1 && player_item_id[id] > 0)
client_cmd(id,"say /drop")
while (player_point[id] > 0)
{
player_point[id]--
switch(random_num(1,4))
{
case 1: {
player_agility[id]++
}
case 2: {
player_strength[id]++
}
case 3: {
player_intelligence[id]++
}
case 4: {
player_dextery[id]++
}
}
}
}
}
}
Zmieniłem na:
public Bot_Setup()
{
for (new id=0; id < MAX; id++)
{
if (is_user_connected(id) && is_user_bot(id))
{
if (random_num(1,3) == 1 && player_item_id[id] > 0)
client_cmd(id,"say /drop")
while (player_point[id] > 0)
{
player_point[id]--
switch(random_num(1,4))
{
case 1: {
player_agility[id]++
}
case 2: {
player_strength[id]++
}
case 3: {
player_intelligence[id]++
}
case 4: {
player_dextery[id]++
case 5: {
player_okrutnosc[id]++
}
}
}
}
}
}
14.To:
public BoostStats(id,amount)
{
player_strength[id]+=amount
player_dextery[id]+=amount
player_agility[id]+=amount
player_intelligence[id]+=amount
}
public SubtractStats(id,amount)
{
player_strength[id]-=amount
player_dextery[id]-=amount
player_agility[id]-=amount
player_intelligence[id]-=amount
}
public BoostRing(id)
{
switch(player_ring[id])
{
case 1: player_intelligence[id]+=5
case 2: player_strength[id]+=5
case 3: player_agility[id]+=5
}
}
public SubtractRing(id)
{
switch(player_ring[id])
{
case 1: player_intelligence[id]-=5
case 2: player_strength[id]-=5
case 3: player_agility[id]-=5
}
}
Zmieniłem na:
public BoostStats(id,amount)
{
player_strength[id]+=amount
player_dextery[id]+=amount
player_agility[id]+=amount
player_intelligence[id]+=amount
player_okrutnosc[id]+=amount
}
public SubtractStats(id,amount)
{
player_strength[id]-=amount
player_dextery[id]-=amount
player_agility[id]-=amount
player_intelligence[id]-=amount
player_okrutnosc[id]-=amount
}
public BoostRing(id)
{
switch(player_ring[id])
{
case 1: player_intelligence[id]+=5
case 2: player_strength[id]+=5
case 3: player_agility[id]+=5
case 4: player_okrutnosc[id]+=5
}
}
public SubtractRing(id)
{
switch(player_ring[id])
{
case 1: player_intelligence[id]-=5
case 2: player_strength[id]-=5
case 3: player_agility[id]-=5
case 4: player_okrutnosc[id]-=5
}
}
/*
15.To:
public showskills(id)
{
new Skillsinfo[768]
format(Skillsinfo,767,"Masz %i sily - to daje tobie %i zycia<br><br>Masz %i zwinnosci - to daje tobie szybsze bieganie o %i punkow i redukuje sile atakow magia %i%%<br><br>Masz %i zrecznosci - Redukuje obrazenia z broni %0.0f%%<br><br>Masz %i inteligencji - to daje im wieksza moc przedmiotom ktorych da sie uzyc<br>",
player_strength[id],
player_strength[id]*2,
player_dextery[id],
floatround(player_dextery[id]*1.3),
player_dextery[id]*3,
player_agility[id],
player_damreduction[id]*100,
player_intelligence[id])
showitem(id,"Skills","None","None", Skillsinfo)
}
Zmieniłem na:
public showskills(id)
{
new Skillsinfo[768]
format(Skillsinfo,767,"Masz %i sily - to daje tobie %i zycia<br><br>Masz %i zwinnosci - to daje tobie szybsze bieganie o %i punkow i redukuje sile atakow magia %i%%<br><br>Masz %i zrecznosci - Redukuje obrazenia z broni %0.0f%%<br><br>Masz %i inteligencji - to daje im wieksza moc przedmiotom ktorych da sie uzyc<br>Masz %i Okrutnosci - Masz %i Dodatkowych obrazen<br>",
player_strength[id],
player_strength[id]*2,
player_dextery[id],
floatround(player_dextery[id]*1.3),
player_dextery[id]*3,
player_agility[id],
player_damreduction[id]*100,
player_intelligence[id],
player_okrutnosc[id],
player_b_damage[id])
showitem(id,"Skills","None","None", Skillsinfo)
}
/*
Sorry ze sie tak rozpisałem.
Gdy chciałem to zkomplikowac to wyskakuje mi:
Zaznacza to:
SubtractStats(id,player_b_extrastats[id])
I pisze:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Loose indentation on line 581
Warning: Loose indentation on line 582
Error: Undefined symbol "SubtractStats" on line 931
Error: Undefined symbol "BoostStats" on line 934
Error: Undefined symbol "BoostRing" on line 935
Error: Undefined symbol "select_class_query" on line 1169
Error: Undefined symbol "BoostRing" on line 1184
Error: Undefined symbol "BoostStats" on line 1185
Error: Undefined symbol "check_class" on line 1240
Error: Undefined symbol "SubtractStats" on line 1388
Error: Undefined symbol "BoostStats" on line 1392
Error: Undefined symbol "BoostRing" on line 1393
Error: Undefined symbol "select_class_query" on line 1412
Error: Undefined symbol "add_barbarian_bonus" on line 1464
Error: Undefined symbol "add_bonus_necromancer" on line 1495
Error: Undefined symbol "add_bonus_scoutdamage" on line 1496
Warning: Loose indentation on line 1497
Error: Undefined symbol "add_bonus_m4masterdamage" on line 1497
Error: Undefined symbol "add_bonus_m3masterdamage" on line 1499
Error: Undefined symbol "add_bonus_knifemasterdamage" on line 1500
Warning: Loose indentation on line 1501
Error: Undefined symbol "add_bonus_illusion" on line 1502
Error: Undefined symbol "item_take_damage" on line 1503
Warning: Loose indentation on line 1583
Error: Undefined symbol "Prethink_Doublejump" on line 1679
Error: Undefined symbol "Prethink_froglegs" on line 1683
Warning: Loose indentation on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Expression has no effect on line 1752
Warning: Loose indentation on line 1753
Warning: Loose indentation on line 1773
Warning: Loose indentation on line 1777
Error: Undefined symbol "Postthink_Doubeljump" on line 1865
Warning: Tag mismatch on line 1971
Warning: Nested comment on line 1986
Warning: Loose indentation on line 2098
Warning: Loose indentation on line 2101
Error: Undefined symbol "item_dagon" on line 2271
Error: Undefined symbol "SubtractStats" on line 2312
Warning: Loose indentation on line 2548
Warning: Loose indentation on line 2549
Warning: Loose indentation on line 2978
Warning: Loose indentation on line 2992
Error: Undefined symbol "BoostStats" on line 3455
Error: Undefined symbol "BoostStats" on line 3592
Compilation aborted.
26 Errors.
Could not locate output file C:\Users\Eryk\Desktop\dbmod_5.9l.amx (compile failed).
Użytkownik Zawodowy edytował ten post 29.05.2010 20:10