Compatible con 2Moons 1.8 en adelante
Es para que ustedes puedan compartir con sus miembros de la Alianza o algún Amigo un reporte de espionaje que ustedes desean.
Función:
Usted puede compartir un Reporte de Espionaje a todos los miembros de tu alianza, a un miembro específico de tu alianza o a un amigo
¿Cómo puedo compartir dicho espionaje?
Una vez tu tengas el reporte de espionaje verás algo como lo siguiente imagen
Le damos click a ese icono y les aparecerá algo como la siguiente imagen
Luego seleccionas si quieres compartir el Reporte de Espionaje con un amigo, o con los miembros de la alianza, le das al botón OK y les saldrá un mensaje como la siguiente imagen
Resultado
Añadir
Display All
Añadir
Display All
Añadir styles\templates\game
page.srtfshow.view.tpl
Agregar en page.message.view.tpl
Luego de
Esto
Traducción al español
Espero que sea de su agrado. Saludos
Es para que ustedes puedan compartir con sus miembros de la Alianza o algún Amigo un reporte de espionaje que ustedes desean.
Función:
Usted puede compartir un Reporte de Espionaje a todos los miembros de tu alianza, a un miembro específico de tu alianza o a un amigo
¿Cómo puedo compartir dicho espionaje?
Una vez tu tengas el reporte de espionaje verás algo como lo siguiente imagen
Le damos click a ese icono y les aparecerá algo como la siguiente imagen
Luego seleccionas si quieres compartir el Reporte de Espionaje con un amigo, o con los miembros de la alianza, le das al botón OK y les saldrá un mensaje como la siguiente imagen
Resultado
Añadir
PHP Source Code: ShowMessagesPage.class.php
- function SRTFshow()
- {
- global $USER, $LNG;
- $this->setWindow('popup');
- $this->initTemplate();
- $RaportID = HTTP::_GP('RaportID', 0);
- $AllyFriends = array();
- $BuddyFriends = array();
- if($USER['ally_id'] != 0){
- $db = Database::get();
- $sql = 'SELECT * FROM %%USERS%% WHERE ally_id = :allianceId AND id != :userId;';
- $AllyFriend = $db->select($sql, array(
- ':allianceId' => $USER['ally_id'],
- ':userId' => $USER['id']
- ));
- foreach($AllyFriend as $friend){
- $AllyFriends[] = array(
- 'friendId' => $friend['id'],
- 'friendUsername' => empty($friend['username']) ? $friend['username'] : $friend['username'],
- );
- }
- }
- $sql = "SELECT sender, owner FROM %%BUDDY%% WHERE (sender = :userID AND buddyType = 1 AND isAccepted = 1) OR (owner = :userID AND buddyType = 1 AND isAccepted = 1);";
- $Friends = database::get()->select($sql, array(
- ':userID' => $USER['id']
- ));
- foreach($Friends as $friend){
- $idToChoose = $friend['sender'];
- if($idToChoose == $USER['id'])
- $idToChoose = $friend['owner'];
- $sql = 'SELECT username FROM %%USERS%% WHERE id = :userId;';
- $AllyFriend = database::get()->selectSingle($sql, array(
- ':userId' => $idToChoose,
- ));
- $isNew = 1;
- foreach($AllyFriends as $AllyFriendin){
- if($AllyFriendin['friendId'] == $idToChoose)
- $isNew = 0;
- }
- if($isNew == 1){
- $AllyFriends[] = array(
- 'friendId' => $idToChoose,
- 'friendUsername' => empty($AllyFriend['username']) ? $AllyFriend['username'] : $AllyFriend['username'],
- );
- }
- }
- $this->tplObj->loadscript('message.js');
- $this->assign(array(
- 'RaportID' => $RaportID,
- 'AllyFriends' => $AllyFriends,
- 'BuddyFriends' => $BuddyFriends,
- 'allyidf' => $USER['ally_id'],
- ));
- $this->display('page.srtfshow.view.tpl');
- }
- function SpyRaportToFreind()
- {
- global $USER, $LNG;
- $this->setWindow('popup');
- $this->initTemplate();
- $RaportID = HTTP::_GP('RaportID', 0);
- $FriendID = HTTP::_GP('FriendID', "", UTF8_SUPPORT);
- $ally = HTTP::_GP('ally', "", UTF8_SUPPORT);
- if($FriendID == ""){
- $this->sendJSON($LNG['msg_ms_4']);
- }elseif($FriendID == "ally" && $USER['ally_id'] != 0){
- $db = Database::get();
- $sql = 'SELECT * FROM %%USERS%% WHERE ally_id = :allianceId AND id != :userId;';
- $AllyFriend = $db->select($sql, array(
- ':allianceId' => $USER['ally_id'],
- ':userId' => $USER['id']
- ));
- foreach($AllyFriend as $friend){
- $sql = 'SELECT * FROM %%MESSAGES%% WHERE message_id = :RaportID && message_owner = :message_owner;';
- $msgInfo = $db->selectSingle($sql, array(
- ':RaportID' => $RaportID,
- ':message_owner' => $USER['id']
- ));
- PlayerUtil::sendMessage($friend['id'], $USER['id'], $USER['username'], 2, $msgInfo['message_subject'], $msgInfo['message_text'], TIMESTAMP, NULL, 1, Universe::getEmulated());
- }
- $this->sendJSON($LNG['msg_ms_3']);
- }elseif($FriendID > 0){
- $db = Database::get();
- $sql = 'SELECT * FROM %%MESSAGES%% WHERE message_id = :RaportID && message_owner = :message_owner;';
- $msgInfo = $db->selectSingle($sql, array(
- ':RaportID' => $RaportID,
- ':message_owner' => $USER['id']
- ));
- PlayerUtil::sendMessage($FriendID, $USER['id'], $USER['username'], 1, $msgInfo['message_subject'], $msgInfo['message_text'], TIMESTAMP, NULL, 1, Universe::getEmulated());
- $this->sendJSON($LNG['msg_ms_3']);
- }else{
- $this->sendJSON($LNG['msg_ms_4']);
- }
- }
Añadir
JavaScript Source Code: message.js
- function SRTF(RaportID)
- {
- var Name = $('#upgrade_name').val();
- ally = '';
- if(Name == 'ally')
- ally = 'ally';
- $.post("game.php?page=messages", {'mode': 'SpyRaportToFreind', 'RaportID': RaportID, 'FriendID': Name, 'ally': ally, 'ajax': 1}, function(data)
- {
- $('.ally_contents').text(data);
- setTimeout(function(){ parent.$.fancybox.close();}, 2000);
- }, "json");
- }
page.srtfshow.view.tpl
Agregar en page.message.view.tpl
Luego de
Esto
Traducción al español
Espero que sea de su agrado. Saludos
VERY SAD