LCKB
[HELP] A gift to all classes - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157)
+----- Forum: Ep3 Support (https://lckb.dev/forum/forumdisplay.php?fid=150)
+------ Forum: Solved topics (https://lckb.dev/forum/forumdisplay.php?fid=151)
+------ Thread: [HELP] A gift to all classes (/showthread.php?tid=4362)



- Drakonium - 01-05-2015


Hi, as I can send a gift to all the characters?

 

Thx so much

Sorry for my english Wink




- DamonA - 01-05-2015

With a SQL code it is possible yes Smile




- WorldOfWars - 01-05-2015



#!/bin/bash
#


host=127.0.0.1
user=root
pass=
newproject_db=newproject_db
item=123
amount=12


select=`mysql -D $newproject_db -h $host --user=$user --password=$pass --skip-column-names -e "SELECT a_index from t_characters where a_enable = 1 ;"`

for char in ${select[@]}

do

setitem=`mysql -D $newproject_db -h $host --user=$user --password=$pass --skip-column-names -e "INSERT into t_auto_give (a_char_index, a_item_index, a_item_count) VALUES ($char, $item, $amount); "`

done

it's a shell. you must create a .sh file, give right to execute with centos cmd. Don't forget to edit amount, item,pass,user and newproject_db




- Drakonium - 01-05-2015

Thanx Wink