diff -Naur elc/actor_scripts.c elcmod/actor_scripts.c --- elc/actor_scripts.c 2010-12-22 07:10:31.000000000 -0600 +++ elcmod/actor_scripts.c 2011-01-03 11:55:52.498146949 -0600 @@ -36,6 +36,8 @@ #include "textures.h" #endif #include "actor_init.h" +#include "bags.h" +#include "awnage.h" #ifndef EXT_ACTOR_DICT const dict_elem skin_color_dict[] = @@ -298,7 +300,19 @@ actors_list[i]->busy = 0; //if(actors_list[i]->actor_id==yourself) printf("%i, unbusy(moved)\n", thecount); //if(actors_list[i]->actor_id<0) printf("%i, unbusy horse(moved)\n", thecount); - + //AWNAGE + if(actors_list[i]->actor_id == yourself && bag_autoopen && authorizedUser==1){ + //check for bags + int b; + for (b=0;bx_tile_pos == bag_list[b].x)&&(actors_list[i]->y_tile_pos == bag_list[b].y)){ + open_bag(bag_list[b].obj_3d_id); + } + } + } + } if (actors_list[i]->que[0] >= move_n && actors_list[i]->que[0] <= move_nw) { next_command(); diff -Naur elc/awnage.c elcmod/awnage.c --- elc/awnage.c 1969-12-31 18:00:00.000000000 -0600 +++ elcmod/awnage.c 2011-01-03 11:55:52.500311837 -0600 @@ -0,0 +1,4 @@ +#include "awnage.h" + +int authorizedUser=0; + diff -Naur elc/awnage.h elcmod/awnage.h --- elc/awnage.h 1969-12-31 18:00:00.000000000 -0600 +++ elcmod/awnage.h 2011-01-03 11:55:52.500311837 -0600 @@ -0,0 +1,22 @@ +/*! + * \file + * \ingroup awnage + * \brief This file holds awnage flags + */ +#ifndef __AWNAGE_H__ +#define __AWNAGE_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + +//#define MAX_FILE_PATH 128 // the max chars allowed int a path/filename for actor textures/masks + +extern int authorizedUser; + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // __AWNAGE_H__ diff -Naur elc/bags.c elcmod/bags.c --- elc/bags.c 2010-12-12 12:33:16.000000000 -0600 +++ elcmod/bags.c 2011-01-03 11:55:52.501282545 -0600 @@ -42,6 +42,7 @@ static const int min_grid_cols = 2; int view_ground_items=0; +int bag_autoopen=0; // forward declarations void draw_pick_up_menu(); diff -Naur elc/bags.h elcmod/bags.h --- elc/bags.h 2010-12-12 12:33:16.000000000 -0600 +++ elcmod/bags.h 2011-01-03 11:55:52.502483753 -0600 @@ -40,6 +40,8 @@ extern int ground_items_menu_y; extern int ground_items_menu_x_len; extern int ground_items_menu_y_len; +extern bag bag_list[NUM_BAGS]; +extern int bag_autoopen; extern Uint32 ground_items_empty_next_bag; /*! diff -Naur elc/dialogues.c elcmod/dialogues.c --- elc/dialogues.c 2010-11-14 11:53:03.000000000 -0600 +++ elcmod/dialogues.c 2011-01-03 11:55:52.503483864 -0600 @@ -17,6 +17,7 @@ #ifdef OPENGL_TRACE #include "gl_init.h" #endif +#include "awnage.h" unsigned char dialogue_string[2048]; unsigned char npc_name[20] = ""; @@ -33,6 +34,9 @@ //int dialogue_menu_dragged=0; int no_bounding_box=0; +int last_response_id=0; //AWNAGE +int last_NPC_id=0; //AWNAGE + int show_keypress_letters=0; int autoclose_storage_dialogue=0; int dialogue_copy_excludes_responses=0; @@ -111,6 +115,44 @@ x_start+=(len+2)*SMALL_FONT_X_LEN; orig_x_start+=(orig_len+2)*SMALL_FONT_X_LEN; } + + /* //AWNAGE */ + if (dialogue_responces[0].to_actor != last_NPC_id && authorizedUser==1) //make sure we have not switched NPCs! + { + last_response_id=0; + last_NPC_id = dialogue_responces[0].to_actor; + } + else if((i<18) && (i>1) && last_response_id && last_NPC_id && authorizedUser==1) + { + i++; +// char tmx[100]; +// snprintf (tmx, sizeof(tmx),"0id %d, 1id:%d", dialogue_responces[0].response_id, dialogue_responces[1].response_id); +// LOG_TO_CONSOLE(c_red1,tmx); + + //flowershop 1,2 + //tavern 2,3 + //generalstore 2,3 + if((dialogue_responces[0].response_id!=1 && dialogue_responces[0].response_id!=2) + || ((dialogue_responces[1].response_id!=2) && (dialogue_responces[1].response_id!=3))) + return; + if((!dialogue_responces[0].in_use && !dialogue_responces[1].in_use)) + return; + len=19; + dialogue_responces[i].in_use=1; + my_strcp(dialogue_responces[i].text,"Repeat last action"); + dialogue_responces[i].response_id=last_response_id; + dialogue_responces[i].to_actor=dialogue_responces[i-1].to_actor; + dialogue_responces[i].x_len=len*8; + dialogue_responces[i].y_len=14; + dialogue_responces[i].x_start=0; + dialogue_responces[i].y_start=14*5+3; + dialogue_responces[i].orig_x_start=0; + dialogue_responces[i].orig_y_start=14*5+3; + dialogue_responces[i].orig_x_len=18*8; //18 is # of characters + dialogue_responces[i].orig_y_len=14; //14 is height of a character + } +/* -- */ + } int display_dialogue_handler(window_info *win) @@ -170,6 +212,16 @@ { if(dialogue_responces[i].in_use) { + //AWNAGE quick storage + if (my_strcompare(dialogue_responces[i].text,"Open storage") && authorizedUser==1){ + char str[24]; + str[0]=RESPOND_TO_NPC; + *((Uint16 *)(str+1))=SDL_SwapLE16((short)dialogue_responces[i].to_actor); + *((Uint16 *)(str+3))=SDL_SwapLE16((short)dialogue_responces[i].response_id); + my_tcp_send(my_socket,(Uint8*)str,5); + close_dialogue(); + } + if(dialogue_responces[i].mouse_over) glColor3f(1.0f,0.5f,0.0f); else @@ -245,7 +297,6 @@ return 0; } - void close_dialogue() { if(dialogue_win >= 0) @@ -308,9 +359,29 @@ void send_response(window_info *win, int response_index) { Uint8 str[16]; + int id; str[0]=RESPOND_TO_NPC; *((Uint16 *)(str+1))=SDL_SwapLE16((short)dialogue_responces[response_index].to_actor); *((Uint16 *)(str+3))=SDL_SwapLE16((short)dialogue_responces[response_index].response_id); + /* NPC specific tweaks :: AWNAGE*/ + id=dialogue_responces[response_index].response_id; + + if(my_strncompare((char*)npc_name, "Vesine", 6)) + { + if(id==1101) last_response_id = id; + } + else if(my_strncompare((char*)npc_name, "Harvy", 5)) + { + if((id-500>=1) && (id-500<=9)) + last_response_id = id; + } + else + { + if(((id-2000>=0) && (id-2000<=12))||((id-4000>=0) && (id-4000<=12))||((id-200>=0) && (id-200<=12))||((id-400>=0) && (id-400<=12))) + { + last_response_id=id; + } + } my_tcp_send(my_socket,str,5); if (autoclose_storage_dialogue && strcmp(dialogue_responces[response_index].text, open_storage_str) == 0) hide_window(win->window_id); diff -Naur elc/.directory elcmod/.directory --- elc/.directory 2011-01-03 16:18:42.120046756 -0600 +++ elcmod/.directory 2011-01-03 16:18:23.972078835 -0600 @@ -1,6 +1,7 @@ [Dolphin] -AdditionalInfo=3 -Timestamp=2011,1,3,16,18,42 +AdditionalInfo=35 +Sorting=6 +Timestamp=2011,1,3,16,18,23 ViewMode=1 [Settings] diff -Naur elc/draw_scene.c elcmod/draw_scene.c --- elc/draw_scene.c 2010-12-12 09:21:20.000000000 -0600 +++ elcmod/draw_scene.c 2011-01-03 11:55:52.504483579 -0600 @@ -308,14 +308,14 @@ } } else { #endif // SKY_FPV - if(rx < -60){ - rx = -60; + if(rx < -80){ + rx = -80; camera_tilt_duration=0; #ifdef NEW_CAMERA_MOTION camera_tilt_speed = 0.0; #endif // NEW_CAMERA_MOTION - } else if(rx > -45){ - rx = -45; + } else if(rx > -25){ + rx = -25; camera_tilt_duration=0; #ifdef NEW_CAMERA_MOTION camera_tilt_speed = 0.0; @@ -337,8 +337,8 @@ } else if (rz < 0) { rz += 360; } - if(new_zoom_level > 4.0f){ - new_zoom_level = 4.0f; + if(new_zoom_level > 8.0f){ + new_zoom_level = 8.0f; camera_zoom_duration = 0; } else if(new_zoom_level < 0.5f) { new_zoom_level = 0.5f; diff -Naur elc/elconfig.c elcmod/elconfig.c --- elc/elconfig.c 2010-12-28 16:34:31.000000000 -0600 +++ elcmod/elconfig.c 2011-01-03 11:55:52.507307877 -0600 @@ -1735,6 +1735,8 @@ #endif add_var(OPT_BOOL,"3d_map_markers","3dmarks",&marks_3d,change_3d_marks,1,"Enable 3D Map Markers","Shows user map markers in the game window",HUD); add_var(OPT_BOOL,"item_window_on_drop","itemdrop",&item_window_on_drop,change_var,1,"Item Window On Drop","Toggle whether the item window shows when you drop items",HUD); + //AWNAGE + add_var(OPT_BOOL,"bag_autoopen","autoopen",&bag_autoopen,change_var,1,"Auto Open Bag","Toggle whether you automagically open a bag when you step on it",CONTROLS); #ifndef MAP_EDITOR2 diff -Naur elc/font.c elcmod/font.c --- elc/font.c 2008-11-19 12:48:49.000000000 -0600 +++ elcmod/font.c 2011-01-03 11:55:52.508466679 -0600 @@ -241,7 +241,10 @@ #ifndef MAP_EDITOR2 void recolour_message(text_message *msg){ if (msg->chan_idx >= CHAT_CHANNEL1 && msg->chan_idx <= CHAT_CHANNEL3 && msg->len > 0 && msg->data[0] && !msg->deleted){ - if (active_channels[current_channel] != msg->channel){ + if (msg->channel>=1000000000){ //guild channel! + msg->data[0] = to_color_char (c_blue1); + } + else if (active_channels[current_channel] != msg->channel){ msg->data[0] = to_color_char (c_grey2); } else { msg->data[0] = to_color_char (c_grey1); diff -Naur elc/gamewin.c elcmod/gamewin.c --- elc/gamewin.c 2010-12-13 16:02:09.000000000 -0600 +++ elcmod/gamewin.c 2011-01-03 11:55:52.510295361 -0600 @@ -1903,6 +1903,14 @@ { quick_use(5); } + else if (key == K_ITEM7) + { + quick_use(6); + } + else if (key == K_ITEM8) + { + quick_use(7); + } else if (key == K_SPELL1) { if(mqb_data[1] && mqb_data[1]->spell_str[0]) { @@ -1939,6 +1947,18 @@ my_tcp_send(my_socket, mqb_data[6]->spell_str, 13); } } + else if (key == K_SPELL7) + { + if(mqb_data[7] && mqb_data[7]->spell_str[0]) { + my_tcp_send(my_socket, mqb_data[7]->spell_str, 13); + } + } + else if (key == K_SPELL8) + { + if(mqb_data[8] && mqb_data[8]->spell_str[0]) { + my_tcp_send(my_socket, mqb_data[8]->spell_str, 13); + } + } // Okay, let's move, even when in console or map mode else if (key == K_TURNLEFT) { @@ -1953,7 +1973,7 @@ str[0] = TURN_RIGHT; my_tcp_send (my_socket, str, 1); } - else if (key==K_ADVANCE) + else if (key==K_ADVANCE && !(you_sit && sit_lock)) { move_self_forward(); } @@ -2361,7 +2381,7 @@ else if (key == K_CAMERAUP) { #ifndef SKY_FPV - if (rx > -60) rx -= 1.0f; + if (rx > -80) rx -= 1.0f; #else // SKY_FPV camera_tilt_speed = -normal_camera_rotation_speed * 0.0005; camera_tilt_duration += 100; @@ -2373,7 +2393,7 @@ else if (key == K_CAMERADOWN) { #ifndef SKY_FPV - if (rx < -45) rx += 1.0f; + if (rx < -25) rx += 1.0f; #else // SKY_FPV camera_tilt_speed = normal_camera_rotation_speed * 0.0005; camera_tilt_duration += 100; @@ -2399,7 +2419,7 @@ { #ifndef SKY_FPV new_zoom_level= new_zoom_level + 0.25; - if (new_zoom_level > 3.75f) new_zoom_level= 3.75f; + if (new_zoom_level > 8.00f) new_zoom_level= 8.00f; #else // SKY_FPV if (camera_zoom_dir == 1) camera_zoom_duration += 100; diff -Naur elc/hud.c elcmod/hud.c --- elc/hud.c 2010-12-28 16:34:31.000000000 -0600 +++ elcmod/hud.c 2011-01-03 11:55:52.511484560 -0600 @@ -42,6 +42,7 @@ #ifdef EMOTES #include "emotes.h" #endif +#include "awnage.h" /* NOTE: This file contains implementations of the following, currently unused, and commented functions: * Look at the end of the file. @@ -158,6 +159,8 @@ return 1; } +int report_position=0; + // initialize anything related to the hud void init_hud_interface (hud_interface type) { @@ -1571,7 +1574,7 @@ if ( (flags & ELW_MOUSE_BUTTON) == 0) return 0; // reserve CTRL clicks for scrolling - if (flags & ELW_CTRL) return 0; +// if (flags & ELW_CTRL) return 0; //disable for AWNAGE LOCATOR //check to see if we clicked on the clock if(view_digital_clock>0){ @@ -1603,6 +1606,11 @@ protocol_name= LOCATE_ME; my_tcp_send(my_socket,&protocol_name,1); + + // send coords to current channel (for quests, hunting chimmys, ...) + if(flags & CTRL && authorizedUser){ + report_position=1; + } return 1; } //check to see if we clicked on the stats @@ -1621,14 +1629,35 @@ if (show_help_text && show_stats_in_hud && (num_disp_stat < NUM_WATCH_STAT-1) && (my - statbar_start_y >= 0) && (my - statbar_start_y < num_disp_stat*15)) show_help(stats_scroll_help_str, -10-strlen(stats_scroll_help_str)*SMALL_FONT_X_LEN, win->len_y-70); + + //AWNAGE stat hover experience left + if (show_stats_in_hud && have_stats && (my - statbar_start_y >= 0) && (my - statbar_start_y < num_disp_stat*15)) + { + char str[20]; + int thestat; + + glEnable(GL_TEXTURE_2D); + + thestat = first_disp_stat + ((my - statbar_start_y ) / 15); + + /* hover only on displayed stats */ + if ((thestat < first_disp_stat) || (thestat > (first_disp_stat+num_disp_stat-1))) + return 0; + + //compose the experience needed + safe_snprintf(str,sizeof(str),"%7li",(*statsinfo[thestat].next_lev - *statsinfo[thestat].exp)); + draw_string_small(-60, thestat*15+statbar_start_y, (unsigned char*)str, 1); + + } + return 0; } /* #define as these numbers are used many times */ #define DEF_QUICKBAR_X_LEN 30 -#define DEF_QUICKBAR_Y_LEN (6*30+1) +#define DEF_QUICKBAR_Y_LEN (8*30+1) #define DEF_QUICKBAR_X (DEF_QUICKBAR_X_LEN+4) -#define DEF_QUICKBAR_Y 64 +#define DEF_QUICKBAR_Y 1 int quickbar_x_len = DEF_QUICKBAR_X_LEN; int quickbar_y_len = DEF_QUICKBAR_Y_LEN; @@ -1690,7 +1719,7 @@ } else if (quickbar_y > window_height || quickbar_x > window_width) { - move_window (quickbar_win, -1, 0, 200, 64); // The player has done something stupid... let him/her correct it + move_window (quickbar_win, -1, 0, 200, 32); // The player has done something stupid... let him/her correct it } else { @@ -1708,7 +1737,7 @@ glEnable(GL_TEXTURE_2D); glColor3f(1.0f,1.0f,1.0f); //ok, now let's draw the objects... - for(i=0;i<6;i++) + for(i=0;i<8;i++) { if(item_list[i].quantity > 0) { @@ -1728,7 +1757,7 @@ x_start= 2; x_end= x_start+27; - y_start= 30*(cur_pos%6)+2; + y_start= 30*(cur_pos%8)+2; y_end= y_start+27; if(quickbar_dir != VERTICAL) @@ -1813,7 +1842,7 @@ //draw the grid if(quickbar_dir==VERTICAL) { - for(y=1;y<6;y++) + for(y=1;y<8;y++) { glVertex3i(0, y*30+1, 0); glVertex3i(quickbar_x_len, y*30+1, 0); @@ -1821,7 +1850,7 @@ } else { - for(y=1;y<6;y++) + for(y=1;y<8;y++) { glVertex3i(y*30+1, 0, 0); glVertex3i(y*30+1, quickbar_x_len, 0); @@ -1841,7 +1870,7 @@ int mouseover_quickbar_handler(window_info *win, int mx, int my) { int y,i=0; int x_screen,y_screen; - for(y=0;y<6;y++) + for(y=0;y<8;y++) { if(quickbar_dir==VERTICAL) { @@ -1918,7 +1947,7 @@ // no in window check needed, already done //see if we clicked on any item in the main category - for(y=0;y<6;y++) + for(y=0;y<8;y++) { if(quickbar_dir==VERTICAL) { @@ -1953,7 +1982,7 @@ item_dragged = -1; return 1; } - for(i=0;i<6;i++) + for(i=0;i<8;i++) { if(item_list[i].quantity && item_list[i].pos==y) { @@ -1999,7 +2028,7 @@ } } //see if there is any item there - for(i=0;i<6;i++) + for(i=0;i<8;i++) { //should we get the info for it? if(item_list[i].quantity && item_list[i].pos==y) @@ -2123,7 +2152,7 @@ //Re-set Flags change_flags(quickbar_win, ELW_TITLE_NONE|ELW_SHOW|ELW_USE_BACKGROUND|ELW_USE_BORDER|ELW_SHOW_LAST); //NEED x_offset - move_window(quickbar_win, -1, 0, window_width-quickbar_x, 64); + move_window(quickbar_win, -1, 0, window_width-quickbar_x, 32); } void build_levels_table() diff -Naur elc/hud.h elcmod/hud.h --- elc/hud.h 2010-11-01 16:12:21.000000000 -0500 +++ elcmod/hud.h 2011-01-03 11:55:52.512489909 -0600 @@ -62,6 +62,8 @@ extern int show_stats_in_hud; extern int show_statbars_in_hud; +extern int report_position; + /*! * \name windows handlers */ diff -Naur elc/key.ini elcmod/key.ini --- elc/key.ini 2007-08-03 01:39:53.000000000 -0500 +++ elcmod/key.ini 2011-01-03 11:55:52.512489909 -0600 @@ -1,3 +1,5 @@ +#K_QUIT = LALT LSHIFT x +#K_QUIT_ALT = LCTRL LSHIFT q #K_CAMERAUP = UP #K_CAMERADOWN = DOWN #K_ZOOMOUT = PAGEDOWN @@ -35,4 +37,7 @@ #K_ITEM4 = LCTRL 4 #K_ITEM5 = LCTRL 5 #K_ITEM6 = LCTRL 6 +#K_ITEM7 = LCTRL 7 +#K_ITEM8 = LCTRL 8 #K_VIEWTEXTASOVERTEXT = LALT o +#K_AUTOOPENBAG = LCTRL - diff -Naur elc/keys.c elcmod/keys.c --- elc/keys.c 2010-11-01 16:01:28.000000000 -0500 +++ elcmod/keys.c 2011-01-03 11:55:52.513048379 -0600 @@ -63,6 +63,8 @@ Uint32 K_ITEM4=CTRL|'4'; Uint32 K_ITEM5=CTRL|'5'; Uint32 K_ITEM6=CTRL|'6'; +Uint32 K_ITEM7=CTRL|'7'; +Uint32 K_ITEM8=CTRL|'8'; Uint32 K_SCREENSHOT=CTRL|'p'; Uint32 K_VIEWTEXTASOVERTEXT=ALT|'o'; Uint32 K_AFK=CTRL|ALT|'a'; @@ -78,8 +80,11 @@ Uint32 K_SPELL4=ALT|'4'; Uint32 K_SPELL5=ALT|'5'; Uint32 K_SPELL6=ALT|'6'; +Uint32 K_SPELL7=ALT|'7'; +Uint32 K_SPELL8=ALT|'8'; Uint32 K_TABCOMPLETE=CTRL|' '; Uint32 K_WINDOWS_ON_TOP=ALT|'w'; +Uint32 K_AUTOOPENBAG=CTRL|'-'; Uint32 K_MARKFILTER=CTRL|'f'; Uint32 K_OPAQUEWIN=CTRL|'d'; #ifdef SKY_FPV @@ -479,6 +484,10 @@ K_ITEM5 = parse_key_string(&file_mem[t]); if((t=get_string_occurance("#K_ITEM6",file_mem,key_file_size,0))!=-1) K_ITEM6 = parse_key_string(&file_mem[t]); + if((t=get_string_occurance("#K_ITEM7",file_mem,key_file_size,0))!=-1) + K_ITEM7 = parse_key_string(&file_mem[t]); + if((t=get_string_occurance("#K_ITEM8",file_mem,key_file_size,0))!=-1) + K_ITEM8 = parse_key_string(&file_mem[t]); if((t=get_string_occurance("#K_SCREENSHOT",file_mem,key_file_size,0))!=-1) K_SCREENSHOT = parse_key_string (&file_mem[t]); if((t=get_string_occurance("#K_VIEWTEXTASOVERTEXT",file_mem,key_file_size,0))!=-1) @@ -509,10 +518,16 @@ K_SPELL5 = parse_key_string(&file_mem[t]); if((t=get_string_occurance("#K_SPELL6",file_mem,key_file_size,0))!=-1) K_SPELL6 = parse_key_string(&file_mem[t]); + if((t=get_string_occurance("#K_SPELL7",file_mem,key_file_size,0))!=-1) + K_SPELL7 = parse_key_string(&file_mem[t]); + if((t=get_string_occurance("#K_SPELL8",file_mem,key_file_size,0))!=-1) + K_SPELL8 = parse_key_string(&file_mem[t]); if((t = get_string_occurance("#K_TABCOMPLETE",file_mem,key_file_size,0)) != -1) K_TABCOMPLETE = parse_key_string(&file_mem[t]); if((t = get_string_occurance("#K_WINDOWS_ON_TOP",file_mem,key_file_size,0)) != -1) K_WINDOWS_ON_TOP = parse_key_string(&file_mem[t]); + if((t = get_string_occurance("#K_AUTOOPENBAG",file_mem,key_file_size,0)) != -1) + K_AUTOOPENBAG = parse_key_string(&file_mem[t]); if((t = get_string_occurance("#K_MARKFILTER",file_mem,key_file_size,0)) != -1) K_MARKFILTER = parse_key_string(&file_mem[t]); if((t = get_string_occurance("#K_OPAQUEWIN",file_mem,key_file_size,0)) != -1) diff -Naur elc/keys.h elcmod/keys.h --- elc/keys.h 2010-11-01 16:01:28.000000000 -0500 +++ elcmod/keys.h 2011-01-03 11:55:52.514047430 -0600 @@ -76,6 +76,7 @@ extern Uint32 K_TABCOMPLETE; /*!< key used to autocomplete commands/buddy names */ extern Uint32 K_WINDOWS_ON_TOP; /*!< key used to toggle the windows_on_top option */ extern Uint32 K_MARKFILTER; /*!< key used to toggle the TAB map mark filtering function */ +extern Uint32 K_AUTOOPENBAG; /*!=0){ + char locator[120]; + snprintf(locator,sizeof(locator),"@My position: %s",&text_buf[11]); + send_input_text_line (locator, sizeof(locator)); + report_position=0; + } + // for all other messages do filtering, ignoring and counters checking etc else { @@ -686,7 +694,10 @@ load_server_markings(); load_questlog(); load_counters(); - send_video_info(); + LOG_TO_CONSOLE(c_blue1, " -----Welcome to the Awnage Rivan Warriors Client-----"); + LOG_TO_CONSOLE(c_blue3, " Suggestions my be posted to http://awnage.blogspot.com"); + LOG_TO_CONSOLE(c_blue2, " Please consider a donation to support this development"); + send_video_info(); previously_logged_in=1; // Print the game date cos its pretty (its also needed for SKY_FPV to set moons for signs, wonders, times and seasons) diff -Naur elc/new_actors.c elcmod/new_actors.c --- elc/new_actors.c 2010-12-07 16:53:45.000000000 -0600 +++ elcmod/new_actors.c 2011-01-03 11:55:52.516488366 -0600 @@ -30,6 +30,7 @@ #endif #include "io/elfilewrapper.h" #include "actor_init.h" +#include "awnage.h" float sitting=1.0f; glow_color glow_colors[10]; @@ -578,6 +579,7 @@ #endif Uint32 uniq_id; // - Post ported.... We'll come up with something later... Uint32 guild_id; + char *name, *guild; //AWNAGE double f_x_pos,f_y_pos,f_z_rot; float scale=1.0f; #ifdef EMOTES @@ -754,11 +756,10 @@ #endif this_actor=calloc(1,sizeof(enhanced_actor)); - /* build a clean player name and a guild id */ { /* get the name string into a working buffer */ - char buffer[256], *name, *guild; + char buffer[256];//, *name, *guild; //AWNAGE moved up to top #ifdef UID my_strncp(buffer,&in_data[32],sizeof(buffer)); #else @@ -789,6 +790,7 @@ /* perform case insensitive comparison/hashing */ my_tolower(name); + #ifdef CUSTOM_LOOK my_tolower(onlyname); #endif //CUSTOM_LOOK @@ -946,6 +948,31 @@ i=add_enhanced_actor(this_actor,f_x_pos,f_y_pos,0.0,f_z_rot,scale,actor_id); + //AWNAGE + //check to see if they are a friend of ours + if(actors_list[i]->actor_id==yourself && authorizedUser==0){ + if (my_strcompare(guild,"Riva")|| + my_strcompare(guild,"CEL")|| + my_strcompare(guild,"HIM")|| + my_strcompare(guild,"Vero")|| + my_strcompare(guild,"LION")|| + my_strcompare(guild,"JusT")|| + my_strcompare(guild,"EG")){ + authorizedUser=1; + } + else if (my_strncompare(name,"awn",3)|| + my_strncompare(name,"pawn",4)|| + // my_strncompare(name,"shea",4)|| //donation by Shea on 2008/04/02 (1.6.0 3 updates) + // my_strncompare(name,"panda",5)|| //donation by Shea on 2008/04/02 (1.6.0 3 updates) + // my_strncompare(name,"kylass",6)|| //donation by Kylass 2008/02/12 (1.5.0 3 updates) + my_strncompare(name,"ednovel",7)|| //donation by Ednovel 2008/07/17 (1.7.0 3 updates) + my_strncompare(name,"bugabear",8)|| //friend of Ryddler and Riva + my_strncompare(name,"gizzmo",6)|| + my_strncompare(name,"doc_savage",10)){ + authorizedUser=1; + } + } + #ifdef EXTRA_DEBUG ERR(); #endif //EXTRA_DEBUG diff -Naur elc/spells.c elcmod/spells.c --- elc/spells.c 2010-11-14 11:53:03.000000000 -0600 +++ elcmod/spells.c 2011-01-03 11:55:52.518152059 -0600 @@ -25,7 +25,8 @@ #define SIGILS_NO 64 #define NUM_SIGILS_LINE 12 // how many sigils per line displayed #define NUM_SIGILS_ROW 3 // how many rows of sigils are there? -#define MAX_DATA_FILE_SIZE 560 +#define MAX_DATA_FILE_SIZE 740 +#define NUM_QUICKSPELLS 8 #define SIGILS_NO 64 #define SPELLS_NO 32 #define GROUPS_NO 8 @@ -133,15 +134,15 @@ //QUICKSPELLS int clear_mouseover=0; int cast_mouseover=0; -mqbdata * mqb_data[7]={NULL};//mqb_data will hold the magic quickbar name, image, pos. -int quickspells=6; +mqbdata * mqb_data[NUM_QUICKSPELLS+1]={NULL};//mqb_data will hold the magic quickbar name, image, pos. +int quickspells=NUM_QUICKSPELLS; int quickspell_size=20;//size of displayed icons in pixels int quickspell_columns=1; -int quickspell_rows=6; +int quickspell_rows=NUM_QUICKSPELLS; int quickspell_x_len=26; -int quickspell_y_len=6*30; +int quickspell_y_len=NUM_QUICKSPELLS*30; int quickspell_x=60; -int quickspell_y=64; +int quickspell_y=1; int quickspells_loaded = 0; @@ -1160,7 +1161,7 @@ { int i; - for(i=1;i<7;i++){ + for(i=1;ispell_id==spell_id && mqb_data[i]->spell_name[0]){ if(mqb_data[0]) safe_snprintf(mqb_data[0]->spell_name, sizeof(mqb_data[0]->spell_name), "%s", mqb_data[i]->spell_name); @@ -1179,7 +1180,7 @@ counters_set_spell_name(id, (char *)data, len); - for (i = 0; i < 7; i++) + for (i = 0; i < NUM_QUICKSPELLS+1; i++) { if (mqb_data[i] != NULL && mqb_data[i]->spell_id==id) { @@ -1255,13 +1256,13 @@ if(!mqb_data[0]) return; - for(i=1;i<7;i++) { + for(i=1;ispell_id==mqb_data[i]->spell_id) { return; } } - for (i = 1; i < 7; i++) + for (i = 1; i < NUM_QUICKSPELLS+1; i++) { if (mqb_data[i] == NULL) { @@ -1271,9 +1272,9 @@ } } - if (i >= 7) + if (i >= NUM_QUICKSPELLS+1) // No free slot, overwrite the last entry - i = 6; + i = NUM_QUICKSPELLS; memcpy (mqb_data[i], mqb_data[0], sizeof (mqbdata)); save_quickspells(); @@ -1284,7 +1285,7 @@ { int i; - if (pos < 1 || pos > 6 || mqb_data[pos] == NULL) { + if (pos < 1 || pos > NUM_QUICKSPELLS || mqb_data[pos] == NULL) { return; } @@ -1292,10 +1293,10 @@ free (mqb_data[pos]); // move the other spells one up - for (i = pos; i < 6; i++) { + for (i = pos; i < NUM_QUICKSPELLS; i++) { mqb_data[i] = mqb_data[i+1]; } - mqb_data[6] = NULL; + mqb_data[NUM_QUICKSPELLS] = NULL; save_quickspells(); cm_update_quickspells(); } @@ -1305,8 +1306,8 @@ { int i=pos; mqbdata * mqb_temp; - if (pos < 1 || pos > 6 || mqb_data[pos] == NULL) return; - if ((pos ==1 && direction==0)||(pos==6 && direction==1)) return; + if (pos < 1 || pos > NUM_QUICKSPELLS || mqb_data[pos] == NULL) return; + if ((pos ==1 && direction==0)||(pos==NUM_QUICKSPELLS && direction==1)) return; if (direction==0){ mqb_temp=mqb_data[i-1]; mqb_data[i-1]=mqb_data[i]; //move it up @@ -1386,7 +1387,7 @@ /* initialise buffer so we don't write uninitalised data to buffer */ memset(data, 0, sizeof(data)); - for (i = 1; i < 7; i++) + for (i = 1; i < NUM_QUICKSPELLS+1; i++) { if (mqb_data[i] == NULL) break; @@ -1439,7 +1440,7 @@ glEnable(GL_BLEND); // Turn Blending On glBlendFunc(GL_SRC_ALPHA,GL_DST_ALPHA); - for(i=1;i<7;i++) { + for(i=1;ispell_name[0]){ x=quickspell_size/2; y=(i-1)*30+15; @@ -1474,7 +1475,7 @@ int pos; pos=my/30+1; - if(pos<7 && pos>=1 && mqb_data[pos] && mqb_data[pos]->spell_name[0]) { + if(pos=1 && mqb_data[pos] && mqb_data[pos]->spell_name[0]) { quickspell_over=pos; elwin_mouse=CURSOR_WAND; return 1; @@ -1488,7 +1489,7 @@ pos=my/30+1; - if(pos<7 && pos>=1 && mqb_data[pos]) + if(pos=1 && mqb_data[pos]) { if ((flags & ELW_LEFT_MOUSE)&&(flags & ELW_SHIFT)) { @@ -1517,7 +1518,7 @@ static int context_quickspell_handler(window_info *win, int widget_id, int mx, int my, int option) { int pos=my/30+1; - if(pos<7 && pos>=1 && mqb_data[pos]) + if(pos<(NUM_QUICKSPELLS+1) && pos>=1 && mqb_data[pos]) { switch (option) { @@ -1534,7 +1535,7 @@ int active_y_len = 0, i; if (quickspell_win < 0) return; - for (i = 6; i > 0; i--) + for (i = NUM_QUICKSPELLS; i > 0; i--) { if (mqb_data[i] != NULL) active_y_len += 30; diff -Naur elc/spells.h elcmod/spells.h --- elc/spells.h 2009-09-30 17:01:57.000000000 -0500 +++ elcmod/spells.h 2011-01-03 11:55:52.518152059 -0600 @@ -39,7 +39,7 @@ //to be sent to the server, including CAST_SPELL and len bytes, len will be byte 2 } mqbdata; -extern mqbdata * mqb_data[7];/*mqb_data holds a spell name, the image and spell ID as well as the data that's being send to the server.*/ +extern mqbdata * mqb_data[9];/*mqb_data holds a spell name, the image and spell ID as well as the data that's being send to the server.*/ extern int spell_temp,spell_dragged; /*! diff -Naur elc/text.c elcmod/text.c --- elc/text.c 2010-12-14 17:47:49.000000000 -0600 +++ elcmod/text.c 2011-01-03 16:02:31.234172381 -0600 @@ -146,11 +146,23 @@ void open_chat_log(){ char starttime[200], sttime[200]; struct tm *l_time; time_t c_time; - - chat_log = open_file_config ("chat_log.txt", "a"); + // + char logsuffix[7]; + char chat_log_file[100]; + char srv_log_file[100]; + // + +//# chat_log = open_file_config ("chat_log.txt", "a"); + time(&c_time); + l_time = localtime(&c_time); + strftime(logsuffix, sizeof(logsuffix), "%Y%m", l_time); + safe_snprintf (chat_log_file, sizeof (chat_log_file), "chat_log_%s.txt", logsuffix); + safe_snprintf (srv_log_file, sizeof (srv_log_file), "srv_log_%s.txt", logsuffix); + + chat_log = open_file_config (chat_log_file, "a"); if (log_chat == LOG_SERVER || log_chat == LOG_SERVER_SEPERATE) - srv_log = open_file_config ("srv_log.txt", "a"); - +//# srv_log = open_file_config ("srv_log.txt", "a"); + srv_log = open_file_config (srv_log_file, "a"); if (chat_log == NULL) { LOG_TO_CONSOLE(c_red3, "Unable to open log file to write. We will NOT be recording anything."); @@ -163,8 +175,8 @@ log_chat = LOG_CHAT; return; } - time(&c_time); - l_time = localtime(&c_time); +//# time(&c_time); +//# l_time = localtime(&c_time); strftime(sttime, sizeof(sttime), "\n\nLog started at %Y-%m-%d %H:%M:%S localtime", l_time); safe_snprintf(starttime, sizeof(starttime), "%s (%s)\n\n", sttime, tzname[l_time->tm_isdst>0]); fwrite (starttime, strlen(starttime), 1, chat_log); diff -Naur elc/translate.c elcmod/translate.c --- elc/translate.c 2010-12-28 16:34:31.000000000 -0600 +++ elcmod/translate.c 2011-01-03 11:55:52.520269405 -0600 @@ -1409,7 +1409,7 @@ /* strings for context menus */ add_xml_identifier(misc, "cm_quickspell_menu", cm_quickspell_menu_str, "Move Up\nMove Down\nRemove\n", sizeof(cm_quickspell_menu_str)); - add_xml_identifier(misc, "cm_textedit_menu", cm_textedit_menu_str, "Cut\nCopy\nPaste\n", sizeof(cm_textedit_menu_str)); + add_xml_identifier(misc, "cm_textedit_menu", cm_textedit_menu_str, "Cut\nCopy\nPaste\nGoogle\n", sizeof(cm_textedit_menu_str)); add_xml_identifier(misc, "cm_quickbar_menu", cm_quickbar_menu_str, "Quickbar Relocatable\nQuickbar Draggable\nReset Quickbar Position\nFlip Quickbar\nEnable Quickbar Menu\n", sizeof(cm_quickbar_menu_str)); add_xml_identifier(misc, "cm_hud_menu", cm_hud_menu_str, "Show Stats\nShow Stats Bars\nShow Digital Clock\nShow Analogue Clock\nShow Seconds\nShow FPS\nShow Minimap\nEnable Quickbar Menu\n--\nEnable Sound Effects\nEnable Music\n--\nCopy Location", sizeof(cm_hud_menu_str)); add_xml_identifier(misc, "cm_banner_menu", cm_banner_menu_str, "Show Names\nShow Health Bars\nShow Health Numbers\nShow Speech Bubbles\nEnable Banner Background\nSit Lock\nRanging Lock\n--\nDisable This Menu\n", sizeof(cm_banner_menu_str)); diff -Naur elc/widgets.c elcmod/widgets.c --- elc/widgets.c 2010-12-28 16:34:31.000000000 -0600 +++ elcmod/widgets.c 2011-01-03 11:55:52.522314378 -0600 @@ -19,6 +19,7 @@ #include "tabs.h" #include "textures.h" #include "translate.h" +#include "url.h" #ifdef OPENGL_TRACE #include "gl_init.h" #endif @@ -2302,6 +2303,7 @@ { widget_list* w = NULL; Uint32 saved_flag; + char* text,url[128]; if (win == NULL) return 0; @@ -2317,6 +2319,11 @@ case 0: text_field_keypress(w, 0, 0, K_CUT, 24); break; case 1: text_field_keypress(w, 0, 0, K_COPY, 3); break; case 2: if (!text_field_keypress(w, 0, 0, K_PASTE, 22)) start_paste_to_text_field(NULL); break; + case 3: + text = text_field_get_selected_text(w->widget_info); + safe_snprintf(url,128,"http://www.google.com/search?q=%s",text); + open_web_link(url); + break; } w->Flags |= saved_flag; return 1;