UID194640
帖子
精華
主題
積分16180
現金
積極性
威望
違規
熱心
推廣次數
閱讀權限30
註冊時間2009-9-5
在線時間 小時
最後登錄1970-1-1
TA的每日心情 | 開心 2020-10-27 09:10 PM |
---|
簽到天數: 2555 天 連續簽到: 1 天 [LV.Master]伴壇終老
|
發表於 2012-8-21 23:12:34
|
顯示全部樓層
本帖最後由 he01204046 於 2012-8-21 11:23 PM 編輯
不知道3CEAM跟你的架設檔的程式上有沒有差別,我以3CEAM來說:
@Private_Password2
"@"是角色暫存用的變數(登出消失),你用這個當然不能
要用到公會的變數,就需要用到伺服器永久儲存變數"$"
而公會又因為每個公會的倉庫都要分開,總不能混在一起
所以這邊我使用:(取用變數的值使用getd,設定變數的值使用setd)
setd "$Private_Password"+getcharid(2),????;
和
getd("$Private_Password"+getcharid(2))
簡單說明,假設某公會會長的公會編號5,則
setd "$Private_Password"+getcharid(2),????;
同等於
set $Private_Password5,????;
沒測試過,你測試看看吧 - Serve_05_02:
- mes "["+$@NPC_Name$+"]";
- mes "歡迎使用保管服務";
- mes "請選擇您要的保管項目";
- next;
- menu "公會倉庫",Serve_05_02_01,
- (strcharinfo(0) == getguildmaster(getcharid(2))?"^ff0000密碼保護^000000":""),Serve_05_02_02,
- "回上一層",Serve_05_Main,
- "離開",Exit_System;
- Serve_05_02_01:
- if ( getcharid(2) == 0 ) {
- mes "["+$@NPC_Name$+"]";
- mes "不好意思,您沒有加入任何公會唷";
- close2; cutin "",255; end;
- }
- if(#Keyin_Chance2>2){
- goto Cannot_USE2;
- }
- if ( zeny < $@GSS_Zeny ) {
- mes "["+$@NPC_Name$+"]";
- mes "使用此服務需要^FF0000"+$@GSS_Zeny+"^000000z";
- mes "您身上擁有的金錢不足";
- close2; cutin "",255; end;
- }
- if(getd("$Private_Password2"+getcharid(2))!=0){
- mes "["+$@NPC_Name$+"]";
- mes "[^669900剩餘輸入機會^000000 : "+(3-#Keyin_Chance2)+" ]";
- mes "系統偵測到您有設定^0000ff防護密碼^000000";
- mes "需要輸入密碼,才能使用倉庫服務";
- next;
- input .@Keyin_Password2;
- if(.@Keyin_Password2==0){
- next;
- goto Serve_05_02;
- }else if(.@Keyin_Password2!=getd("$Private_Password2"+getcharid(2))){
- mes "["+$@NPC_Name$+"]";
- mes "^ff0000密碼錯誤,請重新輸入^000000";
- next;
- set #Keyin_Chance2,#Keyin_Chance2+1;
- if(#Keyin_Chance2>2){
- mes "["+$@NPC_Name$+"]";
- mes "由於您輸入^ff0000錯誤次數^000000過多";
- mes "^996600本服務將凍結30分鐘,已確保防護安全^000000";
- mes "^996600若要解凍,請在線上待滿30分鐘^000000";
- mes "^996600(重登將會清除累計時間)^000000";
- addtimer 1800000, strnpcinfo(3)+"::OnUNLOCK2";
- set @storage_lock2,1;
- close2; cutin "",255;
- end;
- }
- goto Serve_05_Main;
- }else{
- mes "["+$@NPC_Name$+"]";
- mes "^0000ff密碼正確,關閉對話視窗後開啟倉庫^000000";
- close2;
- cutin "",255;
- set zeny,zeny - $@GSS_Zeny;
- guildopenstorage();
- end;
- }
- }
- if ( guildopenstorage() == 1 ) {
- mes "["+$@NPC_Name$+"]";
- mes "不好意思,請您稍等一下";
- mes "有其它的成員正在使用倉庫";
- close2; cutin "",255;
- }
- close2;
- cutin "",255;
- set zeny,zeny - $@GSS_Zeny;
- end;
- Serve_05_02_02:
- mes "["+$@NPC_Name$+"]";
- mes "請選擇您要進行的設定";
- next;
- menu "設定密碼",Serve_05_02_02_01,
- (getd("$Private_Password2"+getcharid(2))!=0?"移除密碼":""),Serve_05_02_02_02,
- "回上一層",Serve_05_02,
- "離開",Exit_System;
- Serve_05_02_02_01:
- if(#Keyin_Chance2>2){ goto Cannot_USE2; }
- if(getd("$Private_Password2"+getcharid(2))==0){
- mes "["+$@NPC_Name$+"]";
- mes "請輸入^0000ff 4至6位數的半形數字^000000 做為密碼";
- next;
- input .@S_Password2;
- next;
- if((.@S_Password2<1000) || (.@S_Password2>999999))
- {
- mes "["+$@NPC_Name$+"]";
- mes "^ff0000範圍不正確^000000";
- mes "您輸入的數字為^0000ff"+.@S_Password2+"^000000";
- next;
- goto Serve_05_02_02;
- }
- mes "["+$@NPC_Name$+"]";
- mes "請再^669900重複輸入^000000一次核對密碼";
- next;
- input .@C_Password2;
- next;
- if(.@S_Password2!=.@C_Password2)
- {
- mes "["+$@NPC_Name$+"]";
- mes "您輸入的密碼^0000ff兩次核對不一樣^000000";
- mes "請再重新輸入一次";
- next;
- goto Serve_05_02_02_01;
- }else{
- setd "$Private_Password2"+getcharid(2),.@C_Password2;
- mes "["+$@NPC_Name$+"]";
- mes "^669900個人防護密碼已設定成功^000000";
- mes "您設定的密碼為^0000ff"+.@C_Password2+"^000000";
- mes "^ff0000請妥善保存,切勿洩漏給自身以外人知道^000000";
- next;
- goto Serve_05_02;
- }
- }else{
- mes "["+$@NPC_Name$+"]";
- mes "您已經有設定過密碼了";
- mes "請問您要更改設定的密碼嗎?";
- next;
- menu "^0000ff更改密碼^000000",Change_Password2,
- "回上一層",Serve_05_02_02,
- "離開",Exit_System;
- }
- Change_Password2:
- if(#Keyin_Chance2>2){ goto Cannot_USE2; }
- mes "["+$@NPC_Name$+"]";
- mes "請輸入原先的密碼";
- next;
- input .@Change_Password2;
- next;
- if(.@Change_Password2!=getd("$Private_Password2"+getcharid(2))){
- mes "["+$@NPC_Name$+"]";
- mes "密碼錯誤,無法繼續下一步驟";
- next;
- goto Serve_05_02_02;
- }else{
- mes "["+$@NPC_Name$+"]";
- mes "請輸入^0000ff 4至6位數的半形數字^000000 做為密碼";
- next;
- input .@S2_Password2;
- next;
- if((.@S_Password2<1000) || (.@S_Password2>=999999))
- {
- mes "["+$@NPC_Name$+"]";
- mes "^ff0000範圍不正確^000000";
- mes "您輸入的數字為^0000ff"+.@S2_Password2+"^000000";
- next;
- goto Change_Password2;
- }
- mes "["+$@NPC_Name$+"]";
- mes "請再^669900重複輸入^000000一次核對密碼";
- next;
- input .@C2_Password2;
- next;
- if(.@S2_Password2!=.@C2_Password2)
- {
- mes "["+$@NPC_Name$+"]";
- mes "您輸入的密碼^0000ff兩次核對不一樣^000000";
- mes "請再重新輸入一次";
- next;
- goto Change_Password2;
- }else{
- setd "$Private_Password2"+getcharid(2),.@C2_Password2;
- mes "["+$@NPC_Name$+"]";
- mes "^006699個人防護密碼已更改成功^000000";
- mes "您設定的密碼為^0000ff"+.@C2_Password2+"^000000";
- mes "^ff0000請妥善保存,切勿洩漏給自身以外人知道^000000";
- next;
- goto Serve_05_02_02;
- }
- }
- Serve_05_02_02_02:
- if(#Keyin_Chance2>2){ goto Cannot_USE2; }
- mes "["+$@NPC_Name$+"]";
- mes "請輸入原先的密碼";
- next;
- input .@Change_Password2;
- next;
- if(.@Change_Password2!=getd("$Private_Password2"+getcharid(2))){
- mes "["+$@NPC_Name$+"]";
- mes "密碼錯誤,無法繼續下一步驟";
- next;
- goto Serve_05_02_02;
- }else{
- mes "["+$@NPC_Name$+"]";
- mes "^0000ff已成功移除密碼^000000";
- mes "^669900您隨時可以在新增您的防護密碼^000000";
- setd "$Private_Password2"+getcharid(2),0;
- next;
- goto Serve_05_02_02;
- }
複製代碼 |
|