")
pos += format(temp[pos], 3072-pos, "Ultimate Warcraft3 http://www.uwc3.com/" )
pos += format(temp[pos], 3072-pos, "Important Information About UWC3 Ultimates ")
pos += format(temp[pos], 3072-pos, "Unlike previous versions of the Warcraft3 and Warcraft Frozen Throne plugins, Ultimate Warcraft3 allows players to train in up to 3 ultimate skills. ")
pos += format(temp[pos], 3072-pos, "In order to make use of the ultimate skills in UWC3 you will need to bind a key for each ultimate and each ultimate has a unique command to be bound. Special abilities are also handled the same way in UWC3. ")
pos += format(temp[pos], 3072-pos, " | Ultimate or Ability | Bind Command | ")
pos += format(temp[pos], 3072-pos, "| Suicide Bomber | bind key wcsuicide | ")
pos += format(temp[pos], 3072-pos, "| Teleport | bind key wcteleport | ")
pos += format(temp[pos], 3072-pos, "| Chain Lightning | bind key wclightning | ")
pos += format(temp[pos], 3072-pos, "| Entangle Roots | bind key wcentangle | ")
pos += format(temp[pos], 3072-pos, "| Flame Strike | bind key wcflame | ")
pos += format(temp[pos], 3072-pos, "| Big Bad Voodoo | bind key wcvoodoo | ")
pos += format(temp[pos], 3072-pos, "| Vengeance | Passive Ability | ")
pos += format(temp[pos], 3072-pos, "| Locust Swarm | bind key wclocust | ")
pos += format(temp[pos], 3072-pos, "| Flash of Light | bind key wcflash | ")
pos += format(temp[pos], 3072-pos, "| Decoy | bind key wcdecoy | ")
pos += format(temp[pos], 3072-pos, "| Gate | bind key wcgate | ")
pos += format(temp[pos], 3072-pos, "| Ability: Mend Wounds | bind key wcmend | ")
pos += format(temp[pos], 3072-pos, "| Ability: Repair Armor | bind key wcrepair | ")
pos += format(temp[pos], 3072-pos, "| Ability: Serpant Ward | bind key wcward | ")
pos += format(temp[pos], 3072-pos, " ")
show_motd( id, temp, "UWC3 Ultimates")
return PLUGIN_CONTINUE
}
// **************************************************************************
// END uwc3_ultimates subroutine
// **************************************************************************
// **************************************************************************
// BEGIN uwc3_attributes subroutine
// Display the UWC3 Attributes Information page
// **************************************************************************
public uwc3_attributes(id){
if (!warcraft3)
return PLUGIN_CONTINUE
new temp[2048]
new pos = 0
pos += format(temp[pos], 2048-pos, "")
pos += format(temp[pos], 2048-pos, "Attributes Information")
pos += format(temp[pos], 2048-pos, " UWC3 provides, in addition to the normal XP system, a new enhancement XP system (E-XP) which allows you to earn Attribute points to spend building your character. These attributes are as follows: ")
pos += format(temp[pos], 2048-pos, "- Strength - Determines your starting base health, stacks with Devotion Aura
")
pos += format(temp[pos], 2048-pos, " - Intellect - Each level of intellect you enhance from 11 - 18 provides a different benefit, check the website for complete details (http://www.mudconnect.com/uwc3/enhancements.html)
")
pos += format(temp[pos], 2048-pos, " - Dexterity - Helps to successfully Evade shots for characters trained in Evasion
")
pos += format(temp[pos], 2048-pos, " - Agility - Determines your base runspeed, stacks with Unholy Aura
")
pos += format(temp[pos], 2048-pos, " - Constitution - Provides health regeneration which stacks with Healing Wave ")
show_motd( id, temp, "Attributes Information")
return PLUGIN_HANDLED
}
// **************************************************************************
// END uwc3_attributes subroutine
// **************************************************************************
// **************************************************************************
// BEGIN uwc3_resistances subroutine
// Display the UWC3 Resistances Information page
// **************************************************************************
public uwc3_resistances(id){
if (!warcraft3)
return PLUGIN_CONTINUE
new temp[2048]
new pos = 0
pos += format(temp[pos], 2048-pos, "")
pos += format(temp[pos], 2048-pos, "Resistances Information
")
pos += format(temp[pos], 2048-pos, " UWC3 provides, in addition to the normal XP system, a new enhancement XP system (E-XP) which allows you to earn Resistance points to spend building a defense system for your character. Each resistance can be trained to 100 points at which time you should be totally covered from the specified damage type. These resistances are as follows: ")
pos += format(temp[pos], 2048-pos, "- Poison - protection against Shadow Strike poison-based attacks
")
pos += format(temp[pos], 2048-pos, " - Disease - protection against Carrion Beetles and Locust Swarm disease-based attacks
")
pos += format(temp[pos], 2048-pos, " - Electricity - protection against Chain Lightning attacks
")
pos += format(temp[pos], 2048-pos, " - Fire - protection against Flamethrower and Napalm Grenade fire-based attacks
")
pos += format(temp[pos], 2048-pos, " - Magic - Similar to a Necklace of Immunity with some exceptions made to attacks covered by other resistance types.
")
show_motd( id, temp, "Resistances Information")
return PLUGIN_HANDLED
}
// **************************************************************************
// END uwc3_resistances subroutine
// **************************************************************************
// **************************************************************************
// BEGIN character_sheet subroutine
// Display a player's character sheet
// **************************************************************************
public character_sheet(id){
new name[32]
new message[2048] = ""
new temp[1024] = ""
new stemp[1024] = ""
new temp2[64] = ""
new sname[64] = ""
new bool:bHasASkill = false
new j = 0
get_user_name(id, name, 31)
new skillptsavail = get_availskillpts( id ) // Count # skillpts unspent
new apts = get_availattribpts( id ) // Get the # available attrib pts
new rpts = get_availresistpts( id ) // Get the # available resist pts
// Calculate how many attrib/resist points can be spent
new extra_xp = (playerxp[id] - xplevel_lev[enh_minlevel])
if (extra_xp < 0) extra_xp = 0
new exp = (extra_xp / 10)
add( message, 2047, " " )
format( stemp, 1024, "Character Sheet: %s", name )
add( message, 2047, stemp )
add( message, 2047, " " )
add( message, 2047, "" )
format( stemp, 1024, "Player Name: %s ", name )
add( message, 2047, stemp )
format( stemp, 1024, "Player Level: %d ", p_level[id] )
add( message, 2047, stemp )
format( stemp, 1024, "Player Rank: %s ", p_rank[id] )
add( message, 2047, stemp )
format( stemp, 1024, "Skillpts Available: %d ", skillptsavail )
add( message, 2047, stemp )
add( message, 2047, " | " )
if (p_level[id] == (MAX_LEVEL-1)){
format( stemp, 1024, "Player XP: %d ", playerxp[id] )
}else{
format( stemp, 1024, "Player XP: %d / %d ",
playerxp[id], xplevel_lev[p_level[id]+1] )
}
add( message, 2047, stemp )
if (p_level[id] == (MAX_LEVEL-1)){
add( message, 2047, "XP Needed: NA " )
}else{
format( stemp, 1024, "XP Needed: %d ",
(xplevel_lev[p_level[id]+1] - playerxp[id]) )
add( message, 2047, stemp )
}
format( stemp, 1024, "Enhancement XP: %d ", exp )
add( message, 2047, stemp )
format( stemp, 1024, "Attribute Pts Available: %d ", apts )
add( message, 2047, stemp )
format( stemp, 1024, "Resistance Pts Available: %d ", rpts )
add( message, 2047, stemp )
add( message, 2047, " | | " )
add( message, 2047, "Attributes " )
format( stemp, 1024, "Strength: %d / %d ",
p_attribs[id][ATTRIBIDX_STR], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Intellect: %d / %d ",
p_attribs[id][ATTRIBIDX_INT], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Dexterity: %d / %d ",
p_attribs[id][ATTRIBIDX_DEX], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Agility: %d / %d ",
p_attribs[id][ATTRIBIDX_AGI], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Constitution: %d / %d ",
p_attribs[id][ATTRIBIDX_CON], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
add( message, 2047, " | " )
add( message, 2047, "Resistances " )
format( stemp, 1024, "Poison Resistance: %d / %d ",
p_resists[id][RESISTIDX_POISON], RESIST_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Disease Resistance: %d / %d ",
p_resists[id][RESISTIDX_DISEASE], RESIST_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Electricity Resistance: %d / %d ",
p_resists[id][RESISTIDX_ELECTRIC], RESIST_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Fire Resistance: %d / %d ",
p_resists[id][RESISTIDX_FIRE], RESIST_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Magic Resistance: %d / %d ",
p_resists[id][RESISTIDX_MAGIC], RESIST_MAX_VALUE )
add( message, 2047, stemp )
add( message, 2047, " | | " )
add( message, 2047, "Skills Trained " )
for (j=1; j 1))
copy(mstr, 31, "(Master)")
format(temp2,64,"%s [level %d] %s ", sname, p_skills[id][j], mstr )
add(temp,1024,temp2)
}
}
if (!bHasASkill){
add(temp,1024, "No skills trained")
}
add( message, 2048, temp )
add( message, 2048, " | " )
add( message,2048," " )
show_motd( id, message, "Your Character Sheet")
}
// **************************************************************************
// END character_sheet subroutine
// **************************************************************************
// **************************************************************************
// BEGIN cmd_whois subroutine
// Display a specified player's character sheet to another player
// **************************************************************************
public cmd_whois(id, arg[]){
new name[32]
new message[2048] = ""
new temp[1024] = ""
new stemp[1024] = ""
new temp2[64] = ""
new sname[64] = ""
new bool:bHasASkill = false
new j = 0
new pid = cmd_target(id, arg, 0)
if (!pid){
client_print(id, print_chat, "[%s] Could not find a matching player [%s]", MOD, arg)
return PLUGIN_HANDLED
}
get_user_name(pid, name, 31)
new skillptsavail = get_availskillpts( pid ) // Count # skillpts unspent
new apts = get_availattribpts( pid ) // Get the # available attrib pts
new rpts = get_availresistpts( pid ) // Get the # available resist pts
// Calculate how many attrib/resist points can be spent
new extra_xp = (playerxp[pid] - xplevel_lev[enh_minlevel])
if (extra_xp < 0) extra_xp = 0
new exp = (extra_xp / 10)
add( message, 2047, "" )
format( stemp, 1024, "Character Sheet: %s", name )
add( message, 2047, stemp )
add( message, 2047, " " )
add( message, 2047, "" )
format( stemp, 1024, "Player Name: %s ", name )
add( message, 2047, stemp )
format( stemp, 1024, "Player Level: %d ", p_level[pid] )
add( message, 2047, stemp )
format( stemp, 1024, "Player Rank: %s ", p_rank[pid] )
add( message, 2047, stemp )
format( stemp, 1024, "Skillpts Available: %d ", skillptsavail )
add( message, 2047, stemp )
add( message, 2047, " | " )
if (p_level[pid] == (MAX_LEVEL-1)){
format( stemp, 1024, "Player XP: %d ", playerxp[pid] )
}else{
format( stemp, 1024, "Player XP: %d / %d ",
playerxp[pid], xplevel_lev[p_level[pid]+1] )
}
add( message, 2047, stemp )
if (p_level[pid] == (MAX_LEVEL-1)){
add( message, 2047, "XP Needed: NA " )
}else{
format( stemp, 1024, "XP Needed: %d ",
(xplevel_lev[p_level[pid]+1] - playerxp[pid]) )
add( message, 2047, stemp )
}
format( stemp, 1024, "Enhancement XP: %d ", exp )
add( message, 2047, stemp )
format( stemp, 1024, "Attribute Pts Available: %d ", apts )
add( message, 2047, stemp )
format( stemp, 1024, "Resistance Pts Available: %d ", rpts )
add( message, 2047, stemp )
add( message, 2047, " | | " )
add( message, 2047, "Attributes " )
format( stemp, 1024, "Strength: %d / %d ",
p_attribs[pid][ATTRIBIDX_STR], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Intellect: %d / %d ",
p_attribs[pid][ATTRIBIDX_INT], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Dexterity: %d / %d ",
p_attribs[pid][ATTRIBIDX_DEX], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Agility: %d / %d ",
p_attribs[pid][ATTRIBIDX_AGI], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Constitution: %d / %d ",
p_attribs[pid][ATTRIBIDX_CON], ATTRIB_MAX_VALUE )
add( message, 2047, stemp )
add( message, 2047, " | " )
add( message, 2047, "Resistances " )
format( stemp, 1024, "Poison Resistance: %d / %d ",
p_resists[pid][RESISTIDX_POISON], RESIST_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Disease Resistance: %d / %d ",
p_resists[pid][RESISTIDX_DISEASE], RESIST_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Electricity Resistance: %d / %d ",
p_resists[pid][RESISTIDX_ELECTRIC], RESIST_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Fire Resistance: %d / %d ",
p_resists[pid][RESISTIDX_FIRE], RESIST_MAX_VALUE )
add( message, 2047, stemp )
format( stemp, 1024, "Magic Resistance: %d / %d ",
p_resists[pid][RESISTIDX_MAGIC], RESIST_MAX_VALUE )
add( message, 2047, stemp )
add( message, 2047, " | | " )
add( message, 2047, "Skills Trained " )
for (j=1; j 1))
copy(mstr, 31, "(Master)")
format(temp2,64,"%s [level %d] %s ", sname, p_skills[pid][j], mstr )
add(temp,1024,temp2)
}
}
if (!bHasASkill){
add(temp,1024, "No skills trained")
}
add( message, 2048, temp )
add( message, 2048, " | " )
add( message,2048," " )
new mtitle[64]
format( mtitle, 64, "Character Sheet for %s", name )
show_motd( id, message, mtitle )
return PLUGIN_HANDLED
}
// **************************************************************************
// END cmd_whois subroutine
// **************************************************************************
// **************************************************************************
// BEGIN set_rankstring subroutine
// Set the player's rank string
// **************************************************************************
public set_rankstring(id){
p_rank[id] = ""
// Set the player's rank title
if ( p_level[id] >= RANK14_LEVEL )
else if ( p_level[id] >= RANK13_LEVEL )
copy(p_rank[id], 18, ranktitles[12])
else if ( p_level[id] >= RANK12_LEVEL )
copy(p_rank[id], 18, ranktitles[11])
else if ( p_level[id] >= RANK11_LEVEL )
copy(p_rank[id], 18, ranktitles[9])
else if ( p_level[id] >= RANK9_LEVEL )
copy(p_rank[id], 18, ranktitles[8])
else if ( p_level[id] >= RANK8_LEVEL )
copy(p_rank[id], 18, ranktitles[7])
else if ( p_level[id] >= RANK7_LEVEL )
copy(p_rank[id], 18, ranktitles[6])
else if ( p_level[id] >= RANK6_LEVEL )
copy(p_rank[id], 18, ranktitles[5])
else if ( p_level[id] >= RANK5_LEVEL )
copy(p_rank[id], 18, ranktitles[4])
else if ( p_level[id] >= RANK4_LEVEL )
copy(p_rank[id], 18, ranktitles[3])
else if ( p_level[id] >= RANK3_LEVEL )
copy(p_rank[id], 18, ranktitles[2])
else if ( p_level[id] >= RANK2_LEVEL )
copy(p_rank[id], 18, ranktitles[1])
else
copy(p_rank[id], 18, ranktitles[0])
return PLUGIN_CONTINUE
}
// **************************************************************************
// END set_rankstring subroutine
// **************************************************************************
// **************************************************************************
// BEGIN displaylevel subroutine
// Calculate and display a player's level
// **************************************************************************
public displaylevel(id,hide){
if ( !id || !is_user_connected(id) )
return PLUGIN_CONTINUE
new parm2[2]
parm2[0] = id
if (!itemsrunning[id] && !endround)
items(parm2)
new bool:bLvled = false
new skillptsavail = 0
new addskillmesg = 0
new xpstring[511] = ""
new name[32]
get_user_name(id, name, 31)
if (playerxp[id] < 0)
playerxp[id]=0
if ((p_level[id] < (MAX_LEVEL-1)) && (playerxp[id] >= xplevel_lev[p_level[id]+1])){
for (new i=(p_level[id]+1); i= xplevel_lev[i]){
// Level Gain
bLvled = true
p_level[id]=i
//client_print(id, print_console, "New level: %d pxp=(%d) xplev=(%d)",
// p_level[id], playerxp[id], xplevel_lev[i])
}
}
}
set_rankstring( id ) // Set the player's rank string
//client_print(id, print_console, "[%s DEBUG] Rank: %s <%d> XP: (%d / %d)",
// MOD, p_rank[id], p_level[id], playerxp[id], xplevel)
if (hide != 3){
// [08-06-04] - Now checks/displays attrib/resist pts avail before skills - K2mia
// hide != 3 specifies available attrib/resist/skill pts can be displayed
new acount = get_attribcount( id )
new apts = get_availattribpts( id )
new rcount = get_resistcount( id )
new rpts = get_availresistpts( id )
if ( (apts > 0) && (acount < ((MAX_ATTRIBS-1) * (ATTRIB_MAX_VALUE-ATTRIB_BASE))) &&
(acount < ATTRIB_MAX_PTS) )
{
// Display attribpts available message
set_hudmessage(200, 100, 0, 0.35, -1.00, 0, 1.0, 5.0, 0.1, 0.2, 2)
show_hudmessage(id,
"You have %d attribute points available (use /selectattrib)", apts)
}else if ( (rpts > 0) && (rcount < ((MAX_RESISTS-1) * RESIST_MAX_VALUE)) &&
(rcount < RESIST_MAX_PTS) )
{
// Display resistpts available message
set_hudmessage(200, 100, 0, 0.35, -1.00, 0, 1.0, 5.0, 0.1, 0.2, 2)
show_hudmessage(id,
"You have %d resistance points available (use /selectresist)", rpts)
}else{
// Determine if player has skills that can be learned
skillptsavail = get_availskillpts( id )
if (skillptsavail){
addskillmesg = 1
// Display skillpts available message
set_hudmessage(200, 100, 0, 0.35, -1.00, 0, 1.0, 5.0, 0.1, 0.2, 2)
show_hudmessage(id,
"You have %d skillpoints available (use /selectskill)", skillptsavail)
}
}
}
if(get_cvar_num("FT_items_in_hud")){
if(playeritem2[id]==0){
format(xpstring,511,"Rank: %s [%d] XP: %d",
p_rank[id], p_level[id], playerxp[id])
}else{
format(xpstring,511,"Rank: %s [%d] XP: %d",
p_rank[id], p_level[id], playerxp[id])
}
}else{
new temp2[128] = ""
new temp3[128] = ""
if (addskillmesg)
format(temp3, 127, "[%d skillpts]", skillptsavail)
format(xpstring,1023,"Rank: %s [%d] XP: %d %s %s", p_rank[id], p_level[id],
playerxp[id], temp2, temp3)
}
message_begin( MSG_ONE, gmsgStatusText, {0,0,0}, id)
write_byte(0)
write_string(xpstring)
message_end()
if (bLvled){
// Level Gained - Player has gained a level
//client_print(id, print_console, "[%s DEBUG] Level Gain p_level=(%d) ",
// MOD, p_level[id])
set_hudmessage(200, 100, 0, -1.0, 0.35, 0, 1.0, 7.0, 0.1, 0.2, 2)
if (loadedlevel[id]){
show_hudmessage(id, "Congratulations - You gained a level")
client_print(0, print_chat,
"[%s] Announcement :: Congratulations %s for gaining a level", MOD, name )
}else{
loadedlevel[id] = 1 // Now player has initial levels loaded from saved XP
show_hudmessage(id, "Status :: Saved XP and Levels Loaded")
}
if (file_exists("sound/warcraft3/levelupcaster.wav")==1 && is_user_alive(id))
emit_sound(id,CHAN_ITEM, "warcraft3/levelupcaster.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
else if (is_user_alive(id))
emit_sound(id,CHAN_ITEM, "plats/elevbell1.wav", 1.0, ATTN_NORM, 0, PITCH_LOW)
}
if (hide!=1 && hide!=3){
new temp[64] = ""
new message[2048] = ""
//new bool:bHasSkills=false
if (p_level[id] < (MAX_LEVEL-1)){
format(temp,64,"^n%s %s [%d] XP: %d/%d","Your Rank:",
p_rank[id], p_level[id], playerxp[id], xplevel_lev[p_level[id]+1])
}else{
format(temp,64,"^n%s %s [%d] XP: %d","Your Rank:",
p_rank[id], p_level[id], playerxp[id] )
}
add(message,2048,temp)
add(message, 2048, "^n(Say /charsheet for your complete info)")
/*
format(temp,64,"^n%s ","Your Skills Summary: (first 20)" )
add(message,2048,temp)
new sname[32] = ""
new nSkills = 0
for (new i=1; i 0) bHasSkills = true
if (!bHasSkills){
format(temp,64,"^n%s ","No Skills Learned" )
add(message,2048,temp)
}
*/
set_hudmessage(255, 255, 255, -1.0, 0.3, 0, 3.0, 7.0, 0.1, 0.2, 2)
show_hudmessage(id,message)
}
if ( !is_user_connected( id ) )
return PLUGIN_CONTINUE
if (get_cvar_num("sv_gravity")>650){
if (p_skills[id][SKILLIDX_LEVITATION] && playeritem2[id]!=FEATHER){
// Levitation
if (get_user_gravity(id)!=p_levitation[p_skills[id][SKILLIDX_LEVITATION]-1])
set_user_gravity(id,p_levitation[p_skills[id][SKILLIDX_LEVITATION]-1])
}else if (playeritem2[id]==FEATHER)
set_user_gravity(id,0.35)
else if (get_user_gravity(id)!=1.0)
set_user_gravity(id,1.0)
}else{
set_user_gravity(id,1.0)
}
if (p_skills[id][SKILLIDX_INVIS]){
// Invisibility
if (knifeselected[id]){
new invisibility = p_invisibility[p_skills[id][SKILLIDX_INVIS]-1]/2
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransTexture,invisibility)
}else
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransTexture,p_invisibility[p_skills[id][SKILLIDX_INVIS]-1])
}else if (playeritem[id]==CLOAK){
if (knifeselected[id]){
new invisibility = CLOAKINVISIBILITY/2
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransTexture,invisibility)
}else{
set_user_rendering(id,kRenderFxNone, 0,0,0, kRenderTransTexture,CLOAKINVISIBILITY)
}
}else{
set_user_rendering(id)
}
// Unholy Aura handler next - Call unholy routine
new parm[1]
parm[0]=id
unholyspeed(parm)
//if (bLvled)
// select_skill(id, 1)
return PLUGIN_CONTINUE
}
// **************************************************************************
// END displaylevel subroutine
// **************************************************************************
// **************************************************************************
// BEGIN cmd_who subroutine
// Displays the list of players
// **************************************************************************
public cmd_who(id){
new message[4096] = ""
new name[32]
new team[32]
new players[32]
new numplayers
get_players(players, numplayers)
new i
new playerid
new pos = 0
pos += format( message[pos], 4096-pos, "^n" )
pos += format( message[pos], 4096-pos, "The following players are online^n" )
pos += format( message[pos], 4096-pos, " ^n" )
pos += format( message[pos], 4096-pos, "| Name | Team | Level | ^n" )
for (i=0; i< numplayers; i++){
playerid = players[i]
if ( get_user_team(playerid) == TEAM_T ) team = "Terrorist"
else if ( get_user_team(playerid) == TEAM_CT ) team = "CT"
else team = "Spectator"
get_user_name( playerid, name, 31 )
log_amx( "Adding player: %s", name )
pos += format( message[pos], 4096-pos, "| %s | %s | %d | ^n",
name, team, p_level[playerid], name)
}
pos += format( message[pos], 4096-pos, " ^n" )
new whofile[64]
get_configsdir( whofile, 63 )
format( whofile, 63, "%s/UWC3/uwc3_who.txt", whofile )
if ( file_exists( whofile ) )
delete_file( whofile )
write_file( whofile, message )
show_motd( id, whofile, "UWC3 Players Online" )
return PLUGIN_CONTINUE
}
// **************************************************************************
// END cmd_who subroutine
// **************************************************************************
// **************************************************************************
// BEGIN player_skills subroutine
// Displays the rank and skills for all players
// **************************************************************************
public player_skills(id){
if ( !warcraft3 )
return PLUGIN_CONTINUE
client_print( id, print_chat,
"[%s] /Playerskills is deprecated, please use /who instead.", MOD)
return PLUGIN_CONTINUE
}
public player_skills_OLD(id){
if (!warcraft3)
return PLUGIN_CONTINUE
new name[32]
new message[2048] = ""
new temp[1024] = ""
new temp2[64] = ""
new temp3[128] = ""
new players[32]
new numberofplayers
get_players(players, numberofplayers)
new i
new playerid
add(message,2047,"")
add(message,2047,"The following players are online")
add(message,2047," ")
// [07-02-04] K2mia => Motd cannot handle a full server of players' skills
// so now we break it up into pages, page # internally kept in lastpspage
new sidx = (lastpspage[id] * 6)
new eidx = sidx + 6 - 1
if (eidx >= numberofplayers){
sidx = ((numberofplayers - 6) >= 0) ? (numberofplayers - 6) : 0
eidx = numberofplayers
lastpspage[id] = 0
}else{
lastpspage[id] += 1
}
for (i = sidx; i < eidx; ++i){
new sname[32] = ""
new bool:bHasASkill = false
playerid=players[i]
get_user_name(playerid,name,31)
temp = ""
for (new j=1; j| %s Rank: %s [%d] - - ",
name, p_rank[playerid], p_level[playerid] )
add(message, 2048, temp3)
add(message, 2048, temp)
add(message, 2048, " | ")
/*if (i % 2 == 0){
format(temp3 ,128,
"%s (Rank: %s [%d]) ",
name, p_rank[playerid], p_level[playerid] )
add(message, 2048, temp3)
add(message, 2048, temp)
add(message, 2048, " | ")
}else{
format(temp3, 128,
"%s (Rank: %s [%d]) ",
name, p_rank[playerid], p_level[playerid] )
add(message, 2048, temp3)
add(message, 2048, temp)
add(message, 2048, " | ")
}*/
}
add(message,2048," ")
show_motd(id,message,"UWC3 Player Skills")
return PLUGIN_CONTINUE
}
// **************************************************************************
// END player_skills subroutine
// **************************************************************************
// **************************************************************************
// END Help and Info Menus and Menu Handler Subroutines
// **************************************************************************
|