diff -Naur elc/Makefile.bsd elcmod2/Makefile.bsd --- elc/Makefile.bsd 2008-07-16 21:13:16.000000000 -0400 +++ elcmod2/Makefile.bsd 2009-04-12 14:55:13.000000000 -0400 @@ -18,7 +18,7 @@ text.c textures.c tile_map.c timers.c translate.c trade.c \ update.c url.c weather.c widgets.c \ books/fontdef.c books/parser.c books/symbols.c books/typesetter.c \ - makeargv.o text_aliases.o + makeargv.o text_aliases.o awnage.o \ NOMAN= true LOCALBASE?=/usr/local diff -Naur elc/Makefile.bsdg elcmod2/Makefile.bsdg --- elc/Makefile.bsdg 2008-07-16 21:13:16.000000000 -0400 +++ elcmod2/Makefile.bsdg 2009-04-12 14:55:13.000000000 -0400 @@ -63,7 +63,7 @@ update.o url.o text.o textures.o tile_map.o timers.o translate.o trade.o \ weather.o widgets.o \ books/fontdef.o books/parser.o books/symbols.o books/typesetter.o \ - makeargv.o text_aliases.o + makeargv.o text_aliases.o awnage.o CXXOBJS=cal3d_wrapper.o eye_candy_wrapper.o \ eye_candy/eye_candy.o eye_candy/math_cache.o eye_candy/effect_lamp.o \ diff -Naur elc/Makefile.linux elcmod2/Makefile.linux --- elc/Makefile.linux 2009-04-12 14:54:01.000000000 -0400 +++ elcmod2/Makefile.linux 2009-04-12 14:55:13.000000000 -0400 @@ -47,6 +47,7 @@ spells.o stats.o storage.o special_effects.o \ tabs.o text.o textures.o tile_map.o timers.o translate.o trade.o \ update.o url.o weather.o widgets.o makeargv.o popup.o \ + awnage.o \ $(foreach FEATURE, $(FEATURES), $($(FEATURE)_COBJ)) CXXOBJS=cal3d_wrapper.o actor_init.o optimizer.o sendvideoinfo.o \ diff -Naur elc/Makefile.osx elcmod2/Makefile.osx --- elc/Makefile.osx 2008-07-16 21:13:17.000000000 -0400 +++ elcmod2/Makefile.osx 2009-04-12 14:55:13.000000000 -0400 @@ -64,7 +64,7 @@ terrain.o text.o textures.o tile_map.o timers.o translate.o trade.o \ update.o url.o weather.o widgets.o \ books/fontdef.o books/parser.o books/symbols.o books/typesetter.o \ - text_aliases.o makeargv.o + text_aliases.o makeargv.o awnage.o CXXOBJS=cal3d_wrapper.o eye_candy_wrapper.o \ eye_candy/eye_candy.o eye_candy/math_cache.o eye_candy/effect_lamp.o \ diff -Naur elc/Makefile.win elcmod2/Makefile.win --- elc/Makefile.win 2009-04-12 14:54:01.000000000 -0400 +++ elcmod2/Makefile.win 2009-04-12 14:55:13.000000000 -0400 @@ -50,6 +50,7 @@ spells.o stats.o storage.o special_effects.o \ tabs.o text.o textures.o tile_map.o timers.o translate.o trade.o \ update.o url.o weather.o widgets.o makeargv.o popup.o \ + awnage.o \ $(foreach FEATURE, $(FEATURES), $($(FEATURE)_COBJ)) CXXOBJS=cal3d_wrapper.o actor_init.o optimizer.o sendvideoinfo.o \ diff -Naur elc/actor_scripts.c elcmod2/actor_scripts.c --- elc/actor_scripts.c 2008-12-19 22:13:19.000000000 -0500 +++ elcmod2/actor_scripts.c 2009-04-12 14:55:13.000000000 -0400 @@ -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[] = @@ -264,7 +266,20 @@ } minimap_touch(); #endif //MINIMAP2 - actors_list[i]->busy = 0; + 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); + } + } + } + } + + actors_list[i]->busy = 0; if (actors_list[i]->que[0] >= move_n && actors_list[i]->que[0] <= move_nw) { next_command(); diff -Naur elc/awnage.c elcmod2/awnage.c --- elc/awnage.c 1969-12-31 19:00:00.000000000 -0500 +++ elcmod2/awnage.c 2009-04-12 14:55:13.000000000 -0400 @@ -0,0 +1,4 @@ +#include "awnage.h" + +int authorizedUser=0; + diff -Naur elc/awnage.h elcmod2/awnage.h --- elc/awnage.h 1969-12-31 19:00:00.000000000 -0500 +++ elcmod2/awnage.h 2009-04-12 14:55:13.000000000 -0400 @@ -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 elcmod2/bags.c --- elc/bags.c 2009-04-12 14:54:01.000000000 -0400 +++ elcmod2/bags.c 2009-04-12 14:55:13.000000000 -0400 @@ -41,6 +41,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 elcmod2/bags.h --- elc/bags.h 2009-03-01 21:02:58.000000000 -0500 +++ elcmod2/bags.h 2009-04-12 14:55:13.000000000 -0400 @@ -38,6 +38,9 @@ extern int ground_items_menu_x_len; extern int ground_items_menu_y_len; +extern bag bag_list[NUM_BAGS]; +extern int bag_autoopen; + /*! * \name windows handlers */ diff -Naur elc/dialogues.c elcmod2/dialogues.c --- elc/dialogues.c 2009-04-12 14:54:02.000000000 -0400 +++ elcmod2/dialogues.c 2009-04-12 15:06:28.000000000 -0400 @@ -16,6 +16,7 @@ #ifdef OPENGL_TRACE #include "gl_init.h" #endif +#include "awnage.h" unsigned char dialogue_string[2048]; unsigned char npc_name[20]; @@ -32,6 +33,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; @@ -95,6 +99,44 @@ x_start+=(len+2)*8; orig_x_start+=(orig_len+2)*8; } + + /* //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) @@ -200,7 +242,6 @@ return 0; } - void close_dialogue() { if(dialogue_win >= 0) @@ -256,9 +297,27 @@ void send_response(window_info *win, int response_index) { Uint8 str[16]; + int id=0; //AWNAGE 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/draw_scene.c elcmod2/draw_scene.c --- elc/draw_scene.c 2008-06-28 18:16:28.000000000 -0400 +++ elcmod2/draw_scene.c 2009-04-12 14:55:13.000000000 -0400 @@ -300,14 +300,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; @@ -329,8 +329,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 < 1.0f) { new_zoom_level = 1.0f; diff -Naur elc/elconfig.c elcmod2/elconfig.c --- elc/elconfig.c 2009-03-01 21:03:01.000000000 -0500 +++ elcmod2/elconfig.c 2009-04-12 14:55:13.000000000 -0400 @@ -1656,6 +1656,7 @@ 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",CONTROLS); add_var(OPT_BOOL,"use_floating_messages", "floating", &floatingmessages_enabled, change_var, 1, "Floating Messages", "Toggles the use of floating experience messages and other graphical enhancements", CONTROLS); + 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); add_var(OPT_BOOL,"use_keypress_dialog_boxes", "keypressdialogues", &use_keypress_dialogue_boxes, change_var, 0, "Keypresses in dialogue boxes", "Toggles the ability to press a key to select a menu option in dialogue boxes (eg The Wraith)", CONTROLS); add_var(OPT_BOOL,"use_full_dialogue_window", "keypressdialoguesfullwindow", &use_full_dialogue_window, change_var, 0, "Keypresses allowed anywhere in dialogue boxes", "If set, the above will work anywhere in the Dialogue Window, if unset only on the NPC's face", CONTROLS); add_var(OPT_BOOL,"use_cursor_on_animal", "useanimal", &include_use_cursor_on_animals, change_var, 0, "For animals, right click includes use cursor", "Toggles inclusion of the use cursor when right clicking on animals, useful for your summoned creatures. Even when this option is off, you can still click the use icon.", CONTROLS); diff -Naur elc/font.c elcmod2/font.c --- elc/font.c 2008-12-19 22:13:22.000000000 -0500 +++ elcmod2/font.c 2009-04-12 14:55:13.000000000 -0400 @@ -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 elcmod2/gamewin.c --- elc/gamewin.c 2009-03-01 21:03:02.000000000 -0500 +++ elcmod2/gamewin.c 2009-04-12 14:55:13.000000000 -0400 @@ -1873,6 +1873,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]) { @@ -1909,6 +1917,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) { @@ -1923,7 +1943,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(); } @@ -2313,7 +2333,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; @@ -2325,7 +2345,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; @@ -2351,7 +2371,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 elcmod2/hud.c --- elc/hud.c 2009-04-12 14:54:02.000000000 -0400 +++ elcmod2/hud.c 2009-04-12 14:55:13.000000000 -0400 @@ -38,6 +38,7 @@ #include "eye_candy_debugwin.h" #endif #include "url.h" +#include "awnage.h" /* NOTE: This file contains implementations of the following, currently unused, and commented functions: * Look at the end of the file. @@ -162,6 +163,8 @@ return 1; } +int report_position=0; + // initialize anything related to the hud void init_hud_interface (hud_interface type) { @@ -1418,7 +1421,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){ @@ -1450,6 +1453,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 @@ -1471,14 +1479,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; @@ -1542,7 +1571,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 { @@ -1560,7 +1589,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) { @@ -1580,7 +1609,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) @@ -1665,7 +1694,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); @@ -1673,7 +1702,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); @@ -1693,7 +1722,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) { @@ -1772,7 +1801,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) { @@ -1807,7 +1836,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) { @@ -1853,7 +1882,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) @@ -1977,7 +2006,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 elcmod2/hud.h --- elc/hud.h 2008-06-28 18:16:28.000000000 -0400 +++ elcmod2/hud.h 2009-04-12 14:55:13.000000000 -0400 @@ -60,6 +60,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 elcmod2/key.ini --- elc/key.ini 2007-12-06 20:50:29.000000000 -0500 +++ elcmod2/key.ini 2009-04-12 14:55:13.000000000 -0400 @@ -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 elcmod2/keys.c --- elc/keys.c 2008-06-28 18:16:28.000000000 -0400 +++ elcmod2/keys.c 2009-04-12 14:55:13.000000000 -0400 @@ -61,6 +61,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'; @@ -75,8 +77,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 @@ -454,6 +459,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) @@ -482,10 +491,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 elcmod2/keys.h --- elc/keys.h 2008-04-04 20:37:04.000000000 -0400 +++ elcmod2/keys.h 2009-04-12 14:55:13.000000000 -0400 @@ -74,6 +74,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; + } + + + + + } } } @@ -635,7 +648,10 @@ load_quickspells(); 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 elcmod2/new_actors.c --- elc/new_actors.c 2009-01-10 21:04:59.000000000 -0500 +++ elcmod2/new_actors.c 2009-04-12 14:55:13.000000000 -0400 @@ -29,6 +29,7 @@ #endif #include "io/elfilewrapper.h" #include "actor_init.h" +#include "awnage.h" float sitting=1.0f; glow_color glow_colors[10]; @@ -534,6 +535,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; @@ -706,11 +708,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 @@ -739,6 +740,7 @@ /* perform case insensitive comparison/hashing */ my_tolower(name); + #ifdef CUSTOM_LOOK my_tolower(onlyname); #endif //CUSTOM_LOOK @@ -878,6 +880,30 @@ 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,"Silk")|| + my_strcompare(guild,"CEL")|| + my_strcompare(guild,"HIM")|| + my_strcompare(guild,"Vero")|| + my_strcompare(guild,"JusT")){ + 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 2009/02/01 (1.8.0 3 updates) + my_strncompare(name,"ednovel",7)|| //donation by Ednovel 2008/07/17 (1.7.0 3 updates) + my_strncompare(name,"mactavish",9)|| //donation by Shea on 2008/04/02 (1.6.0 3 updates) + 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 elcmod2/spells.c --- elc/spells.c 2009-01-08 21:09:08.000000000 -0500 +++ elcmod2/spells.c 2009-04-12 14:55:13.000000000 -0400 @@ -27,7 +27,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 typedef struct { @@ -67,15 +68,15 @@ int last_spell_len= 0; int spell_result=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; #ifdef CONTEXT_MENUS @@ -622,7 +623,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); @@ -640,13 +641,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) { @@ -656,9 +657,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(); @@ -671,7 +672,7 @@ { int i; - if (pos < 1 || pos > 6 || mqb_data[pos] == NULL) { + if (pos < 1 || pos > NUM_QUICKSPELLS || mqb_data[pos] == NULL) { return; } @@ -679,10 +680,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(); #ifdef CONTEXT_MENUS cm_update_quickspells(); @@ -694,8 +695,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 @@ -719,7 +720,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) { @@ -839,7 +840,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; @@ -896,7 +897,7 @@ get_and_set_texture_id(sigils_text); glBegin(GL_QUADS); - for(i=1;i<7;i++) { + for(i=1;ispell_name[0]){ x=quickspell_size/2; y=(i-1)*30+15; @@ -940,7 +941,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; @@ -955,7 +956,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)) { @@ -985,7 +986,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) { @@ -1002,7 +1003,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 elcmod2/spells.h --- elc/spells.h 2008-12-19 22:13:25.000000000 -0500 +++ elcmod2/spells.h 2009-04-12 14:55:13.000000000 -0400 @@ -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 elcmod2/text.c --- elc/text.c 2008-12-19 22:13:25.000000000 -0500 +++ elcmod2/text.c 2009-04-12 14:55:13.000000000 -0400 @@ -137,10 +137,19 @@ void open_chat_log(){ char starttime[200], sttime[200]; struct tm *l_time; time_t c_time; + 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_file, "a"); if (chat_log == NULL) { @@ -154,8 +163,6 @@ log_chat = LOG_CHAT; return; } - 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); @@ -912,8 +919,10 @@ else { char nr_str[16]; - if (cnr >= 1000000000) + if (cnr >= 1000000000){ + color=c_blue1; safe_snprintf (nr_str, sizeof (nr_str), "guild"); + } else safe_snprintf (nr_str, sizeof (nr_str), "%u", cnr); @@ -925,7 +934,12 @@ else { // color set by server - safe_snprintf (msg->data, msg->size, "%.*s @ %s%.*s", ibreak, text_to_add, nr_str, len-ibreak, &text_to_add[ibreak]); + if (cnr >= 1000000000){ + safe_snprintf (msg->data, msg->size, "%.*s @ %s]: %c%.*s", ibreak, text_to_add, nr_str, to_color_char(color),len-ibreak-4, &text_to_add[ibreak+4]); + } + else{ + safe_snprintf (msg->data, msg->size, "%.*s @ %s%.*s", ibreak, text_to_add, nr_str, len-ibreak, &text_to_add[ibreak]); + } } }