lipitb
-
Content Count
7 -
Joined
-
Last visited
Posts posted by lipitb
-
-
Hi!
I want to modify the function "getitemname" for first check the name in the database as my script:example:function script getitemname {set @querysql, query_sql("select name_japanese from `ragdb`.`item_db` WHERE `id` ="+getarg(0)+" ORDER BY id ASC LIMIT 0,1", $@itemname$);if(@querysql == 0) {set $@itemname$, getitemname(getarg(0));}return;}//$@itemname$ = Item name/*==========================================* Get the item name by item_id or null*------------------------------------------*/BUILDIN(getitemname){int item_id=0;struct item_data *i_data;char *item_name;struct script_data *data;data=script_getdata(st,2);script->get_val(st,data);if( data_isstring(data) ){const char *name=script->conv_str(st,data);struct item_data *item_data = itemdb->search_name(name);if( item_data )item_id=item_data->nameid;}elseitem_id=script->conv_num(st,data);i_data = itemdb->exists(item_id);if (i_data == NULL){script_pushconststr(st,"null");return true;}item_name=(char *)aMalloc(ITEM_NAME_LENGTH*sizeof(char));memcpy(item_name, i_data->jname, ITEM_NAME_LENGTH);script_pushstr(st,item_name);return true;} -
gm still can trade ?
The "can_trade" in "groups.conf" is working.
-
Hi!
Who take the vending shop (shop name,item list, price, location x y,map) to database table?
Thanks
-
HI
please
Who return a shop vending title?
src/map/vending.c
if( SQL_ERROR == SQL->Query(mmysql_handle, "INSERT INTO `vending_list` ""(`char_id`,`shopname`,`item_id`,`amount`,`price`,`timestamp`) ""VALUES ('%d', '%s', '%d', '%d', '%d', 'CURRENT_TIMESTAMP')",sd->status.char_id, <RETURN A SHOP TITLE>, sd->status.cart[index], sd->vending.amount, sd->vending.value)){Sql_ShowDebug(mmysql_handle);continue;} -
Good night!I apologize if you're posting in the wrong session, and if the translation is not good. I am Brazilian.I share with you my modification in source.In my hercules emulator upgraded in its latest version, GMs can drop items regardless of the option in can_trade groups.conf.solution:src/map/battle.cFind{ "client_accept_chatdori", &battle_config.client_accept_chatdori, 0, 0, INT_MAX, },Paste before//MODIFICATIONS{ "gm_cant_drop_min", &battle_config.gm_cant_drop_min, 10, 0, 99, },{ "gm_cant_drop_max", &battle_config.gm_cant_drop_max, 98, 0, 99, },src/map/battle.hFindint gm_ignore_warpable_area;int client_accept_chatdori; // [Ai4rei/Mirei]Paste before//MODIFICATIONSint gm_cant_drop_min;int gm_cant_drop_max;src/map/pc.cFindif( !pc->can_give_items(sd) ) //check if this GM level can drop itemsreturn 0;Paste before//MODIFICATIONSif ( battle_config.gm_cant_drop_min != 0 && battle_config.gm_cant_drop_max != 0) {if ( pc_get_group_level(sd) >= battle_config.gm_cant_drop_min && pc_get_group_level(sd) <= battle_config.gm_cant_drop_max ){ // your group you want to disableclif->message(sd->fd, msg_txt(246));return 0;}}insert into Battle_conf.txtgm_cant_drop_min: 10 //This level until the low, GMs cant drop items.gm_cant_drop_max: 98 -
Good night!I apologize if you're posting in the wrong session, and if the translation is not good. I am Brazilian.I share with you my modification in source.In my hercules emulator upgraded in its latest version, the command @reloadscript shows no overall message independent of the configuration file src/map/atcommand.c//atcommand_broadcast( fd, sd, "@broadcast", "You will feel a bit of lag at this point !" );Solution:replace://atcommand_broadcast( fd, sd, "@broadcast", "You will feel a bit of lag at this point !" );to:clif_broadcast(&sd->bl, "LOADING MESSAGE HERE", 150, 0, ALL_CLIENT);So ask for a programmer to call the message file message.conf.
Dynamic IP and Server
in General Server Support
Posted